PluginProbe
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN / 1.3.6
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN v1.3.6
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 1.1.5 All 32 releases
← All changes | uninstall.php +63 -1 1.3.0 → 1.3.6 View file →
@@ -53,8 +53,9 @@
53 53 delete_option( 'xspeed_oc_sync_attempts' );
54 54 delete_option( 'xspeed_overridden_constants' );
55 55 delete_option( 'xspeed_last_mobile_separate' );
56 56 delete_option( 'xspeed_redirect_to_onboarding' );
57 + delete_option( 'xspeed_preloader_firewall_block' );
57 58 delete_option( 'xspeed_onboarding_complete' );
58 59 // Provenance a host plugin wrote before it activated us, and the profile
59 60 // that install came up with.
60 61 delete_option( 'xspeed_installed_by' );
@@ -67,12 +68,73 @@
67 68 delete_option( 'xspeed_stats' );
68 69 delete_option( 'xspeed_gc_cursor' );
69 70 wp_clear_scheduled_hook( 'xspeed_gc' );
70 71
72 + global $wpdb;
73 +
74 + // Hit counters and the Hub attachment flag — ours, and simply never named
75 + // here before. xspeed_hit_buffer is BOTH an option and a transient of the
76 + // same name (Hit_Counter uses one string for the memory buffer and the
77 + // durable counter), so both stores need clearing.
78 + delete_option( 'xspeed_hit_buffer' );
79 + delete_transient( 'xspeed_hit_buffer' );
80 + delete_option( 'xspeed_hit_daily' );
81 + delete_option( 'xspeed_hub_site_attached' );
82 +
83 + // Usage-tracking state, which lives in the shared WP Insights rows rather
84 + // than under our own prefix. Left behind, the consent key survives an
85 + // uninstall: a REINSTALL then reads as already opted in before the wizard
86 + // has asked anything, and a later deactivation posts a diagnostic payload
87 + // for a consent this install never collected (#439).
88 + //
89 + // The two keyed rows are SHARED with sibling WPDeveloper plugins, so only
90 + // our own key comes out and the row itself is deleted only once nothing
91 + // else is using it. Deleting them outright would wipe another plugin's
92 + // consent state.
93 + foreach ( array( 'wpins_allow_tracking', 'wpins_last_track_time' ) as $shared ) {
94 + $value = get_option( $shared );
95 + if ( ! is_array( $value ) ) {
96 + continue; // Absent, or a shape we did not write — leave it alone.
97 + }
98 + unset( $value['xspeed'] );
99 + if ( empty( $value ) ) {
100 + delete_option( $shared );
101 + } else {
102 + update_option( $shared, $value );
103 + }
104 + }
105 + // The deactivation-feedback payload. Normally consumed-then-deleted by the
106 + // tracker's own deactivation send, but that only happens when consent
107 + // passes and the send succeeds — a user who deactivates without consent
108 + // leaves both rows behind, and they are exactly the orphaned diagnostic
109 + // payload #439 describes.
110 + delete_option( 'wpins_deactivation_reason_xspeed' );
111 + delete_option( 'wpins_deactivation_details_xspeed' );
112 + // The tracker's recurring send. Cleared on opt-out, but nothing guarantees
113 + // an opt-out ever happened before the uninstall.
114 + wp_clear_scheduled_hook( 'xspeed_do_weekly_action' );
115 + // Our own WP Insights rows: the site id, the original URL, and the last
116 + // payload — whose name embeds the site id. The payload names are
117 + // derivable from the id, but a failed earlier uninstall or a renamed row
118 + // shape would strand them, so sweep the prefix. `xspeed-pro`'s rows
119 + // survive this only because its slug's HYPHEN doesn't match the
120 + // underscore in `wpins_xspeed_%` — that separator is load-bearing.
121 + delete_option( 'wpins_xspeed_site_id' );
122 + delete_option( 'wpins_xspeed_original_url' );
123 + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- options API has no prefix delete; uninstall only.
124 + $wpins_rows = $wpdb->get_col(
125 + $wpdb->prepare(
126 + "SELECT option_name FROM {$wpdb->options} WHERE option_name LIKE %s",
127 + $wpdb->esc_like( 'wpins_xspeed_' ) . '%'
128 + )
129 + );
130 + foreach ( (array) $wpins_rows as $wpins_row ) {
131 + delete_option( $wpins_row );
132 + }
133 +
71 134 // Score history — the plugin's own table, plus the legacy option the
72 135 // table was migrated from (kept on upgrade so a bad migration is
73 136 // recoverable; there is nothing to recover on uninstall).
74 - global $wpdb;
75 137 // phpcs:ignore WordPress.DB.DirectDatabaseQuery, WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- own table, uninstall.
76 138 $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'xspeed_scores' );
77 139 delete_option( 'xspeed_score_schema' );
78 140 delete_option( 'xspeed_score_history' );