Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add/sitehealth enqueued assets#1

Merged
pbearne merged 22 commits into
xwp:trunkfrom
manuelRod:add/sitehealth-enqueued-assets
Mar 17, 2022
Merged

Add/sitehealth enqueued assets#1
pbearne merged 22 commits into
xwp:trunkfrom
manuelRod:add/sitehealth-enqueued-assets

Conversation

@manuelRod

Copy link
Copy Markdown

@mehigh mehigh requested a review from pbearne December 10, 2021 12:10

@pbearne pbearne left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests look really good well done
Most of the comments are around the invaliding the cache

Comment thread modules/audit-enqueued-assets/load.php Outdated
Comment thread modules/audit-enqueued-assets/load.php Outdated
Comment thread modules/audit-enqueued-assets/load.php Outdated
Comment thread modules/audit-enqueued-assets/load.php Outdated
@manuelRod

Copy link
Copy Markdown
Author

This is the WP issue: WordPress#25

@manuelRod

Copy link
Copy Markdown
Author

@pbearne ready for the second code review, I added everything we talked about.

@pbearne pbearne left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like leaving a query string with an action in the URL as it reruns the action on a page reload

Comment thread modules/audit-enqueued-assets/load.php Outdated

@ThierryA ThierryA left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this 😄 I believe this is still WIP although the this PR is not appearing as a "Draft". Nonetheless I left a few early comments without doing a detailed review yet. The approach to trigger an asset warning is quite weak at the moment and need some more work.

By the way, why opening a PR agains this fork rather than on the https://github.com/WordPress/performance repo, that makes it hard for others to follow along with the review. Could we continue the conversation on the main repo please?

Comment thread modules/audit-enqueued-assets/load.php Outdated
Comment thread modules/audit-enqueued-assets/load.php Outdated
'test' => 'enqueued_css_assets',
);

if ( $enqueued_styles > 10 ) {

@ThierryA ThierryA Dec 16, 2021

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This signal needs to be more robust. The number of stylesheets is somehow a week signal, what really matter is the totally size. We need to grab and sum the size of all stylesheets and define a threshold for the warning.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ThierryA I've opened the PR in WP WordPress#54 we can follow up in there.

@ThierryA ThierryA Dec 17, 2021

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @manuelRod, much appreciated. Left the same comments on the new PR to continue the conversation there.

Comment thread modules/audit-enqueued-assets/load.php Outdated
'test' => 'enqueued_js_assets',
);

if ( $enqueued_scripts > 10 ) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as for the stylesheet, we need to grab and sum the total size of assets loaded.

@pbearne pbearne merged commit 306bbec into xwp:trunk Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants