Tags: theme, speed, optimization
Contributors: tarosky, Takahashi_Fumiki
Tested up to: 5.7
Requires at least: 5.5
Requires PHP: 5.6
Stable Tag: nightly
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
Render the page faster. Enhance your site's load page for Core Web Vital.
This plugin optimize page rendering of WordPress theme.
- Add
loading="lazy"
orloading="eager"
with your images. - Add
defer
orasync
attributes to your scripts. - Add
rel="preload"
to your stylesheets. Polyfill for old browsers is also available. - Remove default script helper of embeds(twitter, instagram) and load one after user interaction.
All of above are selectable and you can customize with white list.
If you wish header logo(.custom-logo
) and main post thumbnail(.post-feature-image
) should be load faster because they are in first view.
Just put custom-logo,post-feature-image
at High Priority section in your setting screen.
Defering JavaScripts sometimes breaks your site. For example, if a script requires just in time operation with inline script tag, it will fail.
<script id="some-script-js" src="somescript.js" defer></script>
<script>
new SomeScript();
</script>
To avoid this, Add some-script
handle name in Deny Defer section in your setting screen.
Generally speaking, many JavaScripts loaded in your WordPress are issued by WordPress Core, plugins, themes, your custom code, and so on.
To optimize JavaScript loading, try and error approaches works fine.
rel="preload"
attributes makes your stylesheets loaded asynchrounsely, but FOUC(Flush of Unstyled Content) happens.
To avoid this, include critical CSS to Deny List in your setting screen. Critical CSS are generally your theme's main stylesheet.
Click install and activate it.
See releases.
Please create new ticket on support forum.
Create a new issue or send pull requests.
- Support separate loading of block styles. Available on WP 5.8 and later.
- Support embed optimization.
- First release.