PluginProbe
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN / 1.3.7
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN v1.3.7
1.3.7 1.3.6 1.3.5 1.3.4 1.3.3 1.3.2 1.3.1 1.3.0 1.2.4 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 All 33 releases
← All changes | includes/class-plugin.php +73 -6 1.3.0 → 1.3.7 View file →
@@ -14,9 +14,9 @@
14 14 /**
15 15 * Data-schema version for one-time migrations, independent of the
16 16 * plugin version header. Bump when adding a step to maybe_upgrade().
17 17 */
18 - public const DATA_VERSION = '1.1.6';
18 + public const DATA_VERSION = '1.3.6';
19 19
20 20 private static $instance = null;
21 21
22 22 /** @var Usage_Tracker|null */
@@ -93,9 +93,23 @@
93 93 // Integrations that clear OTHER plugins' caches of rendered output
94 94 // (Elementor's element cache + generated CSS). Registers a listener
95 95 // only; nothing runs until Cache::purge_render_caches() asks.
96 96 Render_Caches::boot();
97 + // Forwarding needs no boot(): Cache::dispatch_purge_event() calls
98 + // Server_Caches::forward() directly so a throwing third-party listener
99 + // cannot skip it. Both built-in server-cache adapters live behind it —
100 + // LiteSpeed, and the nginx FastCGI cache reached through the host's
101 + // Nginx Helper install (Host_Page_Caches), which is why neither is
102 + // booted here. This boot() registers one listener only: the single
103 + // purge that runs after an import, which the nginx adapter's import
104 + // gate stands down in favour of.
105 + Server_Caches::boot();
97 106
107 + // Tell WP Statistics and Slimstat not to count the warmer, the
108 + // benchmark and the verifier as visitors. Record-time filters only;
109 + // see the class for why the tracking snippet itself is left alone.
110 + Self_Traffic::boot();
111 +
98 112 // Register Free modules via the same action xspeed-pro uses, so
99 113 // the bootstrap path is symmetric across tiers.
100 114 add_action( 'xspeed_register_modules', array( $this, 'register_free_modules' ) );
101 115
@@ -120,8 +134,38 @@
120 134 }
121 135 }
122 136
123 137 /**
138 + * Add the 1.3.6 tracking params to a saved ignored-params list.
139 + *
140 + * Only those names, and only when missing: anything else the site
141 + * removed stays removed. A site with no saved list already reads the new
142 + * defaults.
143 + */
144 + public static function add_new_ignored_params(): void {
145 + $option = Settings_Manager::OPTION_PREFIX . 'cache';
146 + $stored = get_option( $option, array() );
147 + if ( ! is_array( $stored ) || ! is_array( $stored['ignored_query_params'] ?? null ) ) {
148 + return;
149 + }
150 + $list = $stored['ignored_query_params'];
151 + // An empty list is a choice: every query string bypasses the cache.
152 + if ( empty( $list ) ) {
153 + return;
154 + }
155 + $missing = array_values( array_diff( \XSpeed\Modules\Cache\CacheModule::TRACKING_PARAMS_1_3_6, $list ) );
156 + if ( empty( $missing ) ) {
157 + return;
158 + }
159 + $stored['ignored_query_params'] = array_merge( $list, $missing );
160 + update_option( $option, $stored );
161 + // The drop-in keeps its own copy of the list next to the cache.
162 + if ( defined( 'XSPEED_CACHE_DIR' ) ) {
163 + Cache::sync_query_allowlist();
164 + }
165 + }
166 +
167 + /**
124 168 * Run version-gated data migrations exactly once per upgrade.
125 169 *
126 170 * Keyed on `xspeed_data_version` rather than the plugin version header
127 171 * so a migration can be added without forcing a release bump.
@@ -131,17 +175,25 @@
131 175 if ( version_compare( $current, self::DATA_VERSION, '>=' ) ) {
132 176 return;
133 177 }
134 178
179 + // Each step runs once, for the version that needs it. They used to
180 + // run on every bump, which would purge every site's static tree again
181 + // for a migration that has nothing to do with it.
182 +
135 183 // 1.1.2 — strip credential values recorded by earlier versions'
136 184 // settings change annotations (they're served by the trend endpoints).
137 - Activity_Log::redact_legacy_secrets();
185 + if ( version_compare( $current, '1.1.2', '<' ) ) {
186 + Activity_Log::redact_legacy_secrets();
187 + }
138 188
139 189 // 1.1.4 — earlier versions cached a failed loopback as "gzip is not
140 190 // active" for an hour, which showed up as a bogus server-config
141 191 // warning. Drop the stale answer so the fixed probe re-runs instead
142 192 // of the wrong verdict living on past the update (issue #18).
143 - delete_transient( 'xspeed_gzip_active' );
193 + if ( version_compare( $current, '1.1.4', '<' ) ) {
194 + delete_transient( 'xspeed_gzip_active' );
195 + }
144 196
145 197 // 1.1.6 — a `/?s=<term>` request used to write its results page into
146 198 // the static tree under the *searched-from* path, which for the usual
147 199 // query-form search is `/`. The web server then served that results
@@ -149,10 +201,19 @@
149 201 // Cache::store_static(), but an entry poisoned before the update
150 202 // outlives it: nothing purges on upgrade, and the static serve path
151 203 // never revalidates. Clear the tree once. The flat cache is keyed
152 204 // correctly and is deliberately left alone. (issue #191)
153 - Cache::purge_static_tree();
205 + if ( version_compare( $current, '1.1.6', '<' ) ) {
206 + Cache::purge_static_tree();
207 + }
154 208
209 + // 1.3.6 — new click and campaign IDs in the default ignored list.
210 + // A site that ever saved the Cache panel has its own copy of the list,
211 + // which the new defaults never reach, so add them to it.
212 + if ( version_compare( $current, '1.3.6', '<' ) ) {
213 + self::add_new_ignored_params();
214 + }
215 +
155 216 update_option( 'xspeed_data_version', self::DATA_VERSION, false );
156 217 }
157 218
158 219 /**
@@ -260,8 +321,9 @@
260 321 // cache-coverage features (404 / search / feed / REST / rules /
261 322 // maintenance) into one sidebar sub-item (FBS-83633).
262 323 Module_Registry::register( new \XSpeed\Modules\CacheCoverage\CacheCoverageModule() );
263 324 Module_Registry::register( new \XSpeed\Modules\Fonts\FontsModule() );
325 + Module_Registry::register( new \XSpeed\Modules\TurboRender\TurboRenderModule() );
264 326 Module_Registry::register( new \XSpeed\Modules\ResourceHints\ResourceHintsModule() );
265 327 // AI Privacy (GDPR off-switch) ships in Free even though every AI
266 328 // *feature* is Pro — privacy is a right, not a paid tier. FEATURES.md
267 329 // §AI row 6 mandates it. Without this registration the module was dead
@@ -278,8 +340,12 @@
278 340 // snapshot is onboarding/diagnostics, not a paid value-add, so every
279 341 // user gets it. The snapshot degrades gracefully without Pro (Pro
280 342 // version/license fields fall back to defaults via defined()/get_option).
281 343 Module_Registry::register( new \XSpeed\Modules\Support\SupportModule() );
344 + // The dashboard control for usage-analytics consent. Consent used to
345 + // be collectable only in the wizard and withdrawable nowhere, while
346 + // the wizard and readme both promised a dashboard switch. (#437)
347 + Module_Registry::register( new \XSpeed\Modules\Privacy\PrivacyModule() );
282 348 // MCP remote control (AI assistants) — Free. The plugin serves the
283 349 // MCP protocol at the site's own /xspeed/mcp URL; the only gate is
284 350 // the per-site connection token an admin mints via Connect. No
285 351 // license, no hosted infra. See IMPLEMENTATION.md §17.
@@ -294,10 +360,11 @@
294 360 public function start_plugin_tracking(): void {
295 361 $this->usage_tracker = Usage_Tracker::get_instance(
296 362 XSPEED_FILE,
297 363 array(
298 - 'opt_in' => true,
299 - 'item_id' => defined( 'XSPEED_INSIGHTS_ITEM_ID' ) ? XSPEED_INSIGHTS_ITEM_ID : false,
364 + 'opt_in' => true,
365 + 'email_marketing' => true,
366 + 'item_id' => defined( 'XSPEED_INSIGHTS_ITEM_ID' ) ? XSPEED_INSIGHTS_ITEM_ID : false,
300 367 )
301 368 );
302 369 $this->usage_tracker->init();
303 370 }