WordPress / wporg-main-2022

A block-based child theme for WordPress.org, plus local environment
64 stars 26 forks source link

Optimize frontend resources for performance #332

Open adamwoodnz opened 10 months ago

adamwoodnz commented 10 months ago

There are a lot of unused style resources being loaded on the homepage which are affecting performance, and are highlighted in the LCP metric of pagespeed/lighthouse tests:

Screenshot 2023-10-16 at 9 20 48 AM

This likely affects other pages too. Work has been done in Showcase to stop loading these resources, and we can follow this approach in this theme.

We could consider a mu-plugin solution which stops certain resources being loaded across the network, on a page-by-page basis.

adamwoodnz commented 9 months ago

Noting that dashicons CSS is required for some pages like /about/stats, and had to be explicitly loaded with WP 6.5, see https://github.com/WordPress/wporg-main-2022/issues/354

ryelle commented 4 months ago

I've pulled this & the corresponding draft PR out of the "redesign" board since there hasn't been activity on it.