Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit Autoloaded Options Site Health should extend Core's check if available #1274

Closed
joemcgill opened this issue Jun 4, 2024 · 0 comments · Fixed by #1298
Closed

Audit Autoloaded Options Site Health should extend Core's check if available #1274

joemcgill opened this issue Jun 4, 2024 · 0 comments · Fixed by #1298
Assignees
Labels
[Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only [Type] Bug An existing feature is broken

Comments

@joemcgill
Copy link
Member

Bug Description

A simplified version of the Audit Autoloaded Options Site Health from this plugin has been merged into WP trunk (see issue). The Site Health Check in this plugin still works when the plugin is installed on a site running WP nightlies, but instead of extending the check, it replaces it entirely, which means that core filters for things like the site_status_autoloaded_options_size_limit no longer work, and instead need to use the plugin specific perflab_aao_autoloaded_options_limit_size_in_bytes version.

Steps to reproduce

  1. Upgrade core local development environment using https://wordpress.org/wordpress-6.6-beta1.zip or a nightly version.
  2. Install and activate the Performance Lab plugin
  3. Try to filter the autoloaded options size limit, like add_filter( 'site_status_autoloaded_options_size_limit', '__return_zero' );
  4. Observe that no issues are visible from the Site Health screen
  5. Deactivate the plugin with the same filter still registered
  6. Observe that a critical issue is now visible

Suggested approach

The Site Health check in this plugin should still support all supported versions of WordPress (currently 6.4+) so we'll need to do a check to see if there is already a autoloaded_options check returned from WP_Site_Health::get_tests() before adding our own. If it already exists, then our enhancements to the test like the description added via perflab_aao_get_autoloaded_options_table() should hook into various filters like the site_status_autoloaded_options_limit_description filter.

Optionally, we could already shim in support for anyone using the filters in the 6.6 checks so that they wouldn't have to update their code when upgrading from 6.5 to 6.6 with the Performance Lab plugin running.

@joemcgill joemcgill added [Type] Bug An existing feature is broken [Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only labels Jun 4, 2024
@westonruter westonruter added this to the performance-lab n.e.x.t milestone Jun 4, 2024
@mukeshpanchal27 mukeshpanchal27 self-assigned this Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only [Type] Bug An existing feature is broken
3 participants