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

Improve Enqueued Assets report in Site Health #267

Open
mxbclang opened this issue Mar 28, 2022 · 2 comments
Open

Improve Enqueued Assets report in Site Health #267

mxbclang opened this issue Mar 28, 2022 · 2 comments
Labels
Good First Issue Issue particularly suitable to be worked on by new contributors [Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only [Type] Enhancement A suggestion for improvement of an existing feature

Comments

@mxbclang
Copy link
Contributor

The current Site Health reports for the Enqueued Assets module, introduced in #25, do not include actionable information for users about how to address a site loading too many enqueued assets. As noted by @felixarntz here:

We also need to think about how to make this warning more actionable, e.g. at a minimum tell users which plugins or themes are responsible for enqueuing the majority of assets etc.

Suggestions for changes (in progress) are below.

Enqueued scripts

If acceptable

image

Current description: The amount of [#] enqueued scripts (size: [size]) is acceptable.

New description:

If not acceptable

image

Current description: Your website enqueues [#] scripts (size: [size]). Try to reduce the number or to concatenate them.

More info about performance optimization

Clean Test Cache

New description:

Enqueued styles

If acceptable

image

Current description: The amount of [#] enqueued styles (size: [size]) is acceptable.

New description:

If not acceptable

image

Current description: Your website enqueues [#] styles (size: [size]). Try to reduce the number or to concatenate them.

More info about performance optimization

Clean Test Cache

@felixarntz
Copy link
Member

@bethanylang The recommendation "Try to reduce the number or to concatenate them." would only address the number of files problem, not the overall amount of JS/CSS problem. So I think that would only be the first half of the solution. We also need some at least high-level advice for when it's overall too much JS/CSS - which is obviously harder to resolve because concatenating won't reduce that, you would actually need to optimize the code as a developer, or identify which parts of the JS/CSS is maybe not critical (or from a non-critical plugin) so that you can remove it.

I think we should also show only the advice that applies, based on whether the amount of JS/CSS exceeds the threshold or whether the number of files of JS/CSS exceeds the threshold. Or if both, we would show both. But the main point here would be to also provide a recommendation for the first scenario.

@mxbclang mxbclang removed their assignment Mar 29, 2022
@mxbclang mxbclang added [Type] Enhancement A suggestion for improvement of an existing feature [Module] Audit Enqueued Assets labels May 5, 2022
@felixarntz felixarntz added the [Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only label Jul 19, 2023
@joemcgill joemcgill added Good First Issue Issue particularly suitable to be worked on by new contributors and removed [Plugin] Audit Enqueued Assets labels Nov 27, 2024
@b1ink0
Copy link
Contributor

b1ink0 commented Dec 15, 2024

For the enqueued scripts the following can be the detailed message.

Image

@felixarntz can this message be improved by adding more links to resources?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Issue particularly suitable to be worked on by new contributors [Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only [Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

5 participants