Discover, trust, install: FAIR 1.0 is here
Page Optimize
Version: 0.5.7
Description
This plugin supports a few features that may improve the performance of page loading and rendering in the browser:
- Concatenate CSS
- Concatenate JavaScript
- Execution timing of non-critical scripts
- Note: Changing script execution timing can be risky and will not work well for all sites.
Testing
To test features without enabling them for the entire site, you may append query params to a WordPress post or page URL. For example, to test enabling JavaScript concatenation for https://example.com/blog/
, you can use the URL https://example.com/blog/?concat-js=1
.
Supported query params:
concat-css
controls CSS concatenation. Values:1
for ON and0
for OFF.concat-js
controls JavaScript concatenation. Values:1
for ON and0
for OFF.load-mode-js
controls how non-critical JavaScript are loaded. Values: ‘defer’ for deferred, ‘async’ for async loading, any other value indicates the feature should be disabled.
Installation
This plugin uses sensible defaults so it can operate without configuration, but there are a number of constants you may use for a custom configuration.
PAGE_OPTIMIZE_CACHE_DIR
Page Optimize caches concatenated scripts and styles by default, and this constant controls where the cache files are stored. The default directory is cache/page_optimize
under your site’s wp-content
folder.
To change the cache location, set this constant to the absolute filesystem path of that location.
To disable caching, set this constant to false
. Please note that disabling Page Optimize caching may negatively impact performance unless you are caching elsewhere.
PAGE_OPTIMIZE_CSS_MINIFY
Page Optimize has CSS Minification capabilities which are off by default.
If you’re using caching, and not minifying CSS elsewhere, it is recommended to enable it by setting it to true
.
Reviews
Plugin's Concatenate JavaScript Function Interferes with WP Visual Editor
By wptester765467 on April 6, 2024
When the plugin's Concatenate JavaScript function is checked, it will interfere with WP's visual editor. Rendering the visual editor invisible. Disabling this function will enable you to use the WP Visual Editor again.
broke my js
By toomanyphils on February 22, 2024
self explanatory
Simple and effective
By Mohamad Al Karbi (mohamadkarbi) on May 6, 2023
Without mentioning the need for CDN, Cache, …, Page Optimize (for aggregating CSS) with Jetpack Boost (for deferring JS) gave me the best results for free. It does the job in simple way. I summarize my experience with this plugin and similars on: https://mohamadkarbi.com/why-i-host-with-wordpress/
Not updated, don't waste your time
By samsam57 on August 11, 2022
Bugs
By mhogas on April 14, 2021
page_optimize_bail()
.
if( is_admin() ){
return true;
}
if( class_exists('\Elementor\Plugin') &&
( ( isset($_REQUEST['action']) && $_REQUEST['action'] === 'elementor' ) || isset( $_REQUEST['elementor-preview'] ) ) ){
return true;
}
Changelog
0.5.7
- Update Tested Up To Version to 6.8.
0.5.6
- Update Tested Up To version to 6.7.
0.5.5
- Fix: Stop skipping inline scripts when src is empty.
0.5.4
- Bail when editing pages or posts in the Editor. Increased the max concatenated file limit.
0.5.1
- Bail when editing pages in Brizy Editor (it errors when JavaScript load mode is
async
).
0.5.0
- Apply the
script_loader_tag
filter for scripts that are concatenate-able but have no neighbors to concatenate with. This fixes a case where the TwentyTwenty theme wanted to apply adefer
attribute to its script but was never given the opportunity.
0.4.5, 0.4.6
- Force absolute paths for CSS replacements.
- Lower required PHP version to 7.0.
0.4.4
- Don’t queue the cache cleaning WP Cron job if we aren’t caching.
- Cleanup cache if we turned caching off or directory changed.
0.4.3
- gzip in PHP slows stuff down a bit. Simply don’t do this. Any web server can handle this better.
- also remove the output buffering, no need for that anymore
- CSS Minification can sometimes slow things down significantly. Add constant to enable/disable.
0.4.2
- Initial release. No changes yet. 🙂