# xspeed/1.0.0/xspeed.php

xSpeed Cache: AI-Powered Performance Hub with MCP, Caching &amp; CDN, version 1.0.0. 54 lines.

- Page: https://pluginprobe.com/plugins/xspeed/1.0.0/code/xspeed.php
- Raw: https://pluginprobe.com/plugins/xspeed/1.0.0/raw/xspeed.php
- Modified: 2026-05-27T11:31:36+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/xspeed/1.0.0/code/xspeed.php#L10-L20`.

```php
<?php
/**
 * Plugin Name: xSpeed
 * Description: Minimal, ultra-fast caching plugin for WordPress.
 * Version: 1.0.0
 * Requires at least: 6.0
 * Tested up to: 6.9
 * Requires PHP: 7.4
 * Author: WPDeveloper
 * Author URI: https://wpdeveloper.com
 * License: GPLv2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: xspeed
 *
 * @package XSpeed
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

define( 'XSPEED_VERSION', '1.0.0' );
define( 'XSPEED_FILE', __FILE__ );
define( 'XSPEED_DIR', plugin_dir_path( __FILE__ ) );
define( 'XSPEED_URL', plugin_dir_url( __FILE__ ) );
define( 'XSPEED_CACHE_DIR', WP_CONTENT_DIR . '/cache/xspeed' );

spl_autoload_register(
	function ( $class ) {
		if ( strpos( $class, 'XSpeed\\' ) !== 0 ) {
			return;
		}
		$relative = str_replace( 'XSpeed\\', '', $class );
		$file     = XSPEED_DIR . 'includes/class-' . strtolower( str_replace( '_', '-', $relative ) ) . '.php';
		if ( file_exists( $file ) ) {
			require_once $file;
		}
	}
);

if ( file_exists( XSPEED_DIR . 'vendor/autoload.php' ) ) {
	require_once XSPEED_DIR . 'vendor/autoload.php';
}

register_activation_hook( __FILE__, array( 'XSpeed\\Plugin', 'activate' ) );
register_deactivation_hook( __FILE__, array( 'XSpeed\\Plugin', 'deactivate' ) );

add_action(
	'plugins_loaded',
	function () {
		\XSpeed\Plugin::instance()->init();
	}
);

```
