Add module to warn about excessive amount of autoloaded options#124
Conversation
|
How I can add Focus/Type/Milestone? It seems I don't have permissions |
|
A screenshot of what this looks like might be useful. |
mitogh
left a comment
There was a problem hiding this comment.
Great work just few minor comments / suggestions.
mitogh
left a comment
There was a problem hiding this comment.
Just one minor thing other than that looks great thanks @manuelRod for your work on this one.
felixarntz
left a comment
There was a problem hiding this comment.
While the code looks technically solid, I have some concerns about this module as it is right now, as it is not actionable. What can we reasonably expect an end user to do here? While other Site Health status warnings are also technical, this is another level, there is no way for someone other than a developer to fix this. A way to make this more actionable for site owners would be to give some indication which plugins or themes are adding the majority of these, and then the end user could decide whether one of those isn't critical to them.
If there is consensus that this should be merged even in the state that it is, I'd be in favor of marking it as experimental.
|
The code here looks solid technically now. Whether or how we should merge it depends on the vote in #92 (comment) which is open until this Friday. |
| $result['actions'] = sprintf( | ||
| /* translators: 1: HelpHub URL. 2: Link description. */ | ||
| '<p><a target="_blank" href="%1$s">%2$s</a></p>', | ||
| esc_url( __( 'https://wordpress.org/support/article/optimization/', 'performance-lab' ) ), |
There was a problem hiding this comment.
this link should go right to a support section explaining how to optimize autoload options, eg https://wordpress.org/support/article/optimization/#autoload. The link as is is not helpful to users - especially since the page doesn't even mention autoload options.
There was a problem hiding this comment.
I agree with this, https://wordpress.org/support/article/optimization/#autoload should be written and we can link in there.
|
@manuelRod Updated this PR to be against the |


Summary
Adds check into Site Health screen for autoloaded options.
Fixes #92
Relevant technical choices
There is a limit by default to trigger warnings (800kb)
There are 3 filters to modify the default behavior ( limit, description, and actions to take).
Those would be used by hosting companies to adapt to their requirements.
Filters:

## Checklist[Focus]orInfrastructurelabel.[Type]label.no milestonelabel.