You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SEO_Integration::detect_active_plugin() caches the active SEO plugin (to pick the meta-description meta key) in the wpai_active_seo_plugin transient,
The positive result is stored with no expiry and is only cleared on deactivated_plugin - a hook that's registered only while the Meta Description experiment is enabled. So the cache can go stale and never self-heal.
The "no SEO plugin active" result is never cached, so a full plugin scan runs on every call, including the front-end output_meta_description() path.
Invalidation (only when the experiment is on): includes/Experiments/Meta_Description/Meta_Description.php:60 (deactivated_plugin) and :165 (delete_transient). No activated_plugin handling.
Step-by-step reproduction instructions
Activate a supported SEO plugin (e.g. Yoast) + enable the Meta Description experiment; trigger meta handling once to cache the slug.
Disable the Meta Description experiment.
Deactivate the SEO plugin.
Re-enable the experiment → detection still returns the deactivated plugin's slug, and never corrects itself (no expiry).
Impact
Stale cache: if the SEO plugin changes while the experiment is disabled (so the clear hook isn't registered), the cached slug persists forever, and meta descriptions are read/written under the wrong meta key.
Performance: sites with no supported SEO plugin re-scan all plugins (is_plugin_active()) on every meta-description call.
Description
SEO_Integration::detect_active_plugin()caches the active SEO plugin (to pick the meta-description meta key) in thewpai_active_seo_plugintransient,deactivated_plugin- a hook that's registered only while the Meta Description experiment is enabled. So the cache can go stale and never self-heal.output_meta_description()path.Code
includes/Abilities/Meta_Description/SEO_Integration.php:78-96Invalidation (only when the experiment is on):
includes/Experiments/Meta_Description/Meta_Description.php:60(deactivated_plugin) and:165(delete_transient). Noactivated_pluginhandling.Step-by-step reproduction instructions
Impact
is_plugin_active()) on every meta-description call.Affected files
includes/Abilities/Meta_Description/SEO_Integration.php(78-96)includes/Experiments/Meta_Description/Meta_Description.php(60, 165)Suggested fix
DAY_IN_SECONDS).activated_plugin, or make invalidation independent of the experiment toggle.Screenshots, screen recording, code snippet
Screen.Recording.2026-08-24.at.9.07.02.PM.mov
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except the AI plugin.
Please confirm which theme type you used for testing.