PageSpeed Ninja

Description

PageSpeed Ninja is the ultimate WordPress performance plugin designed to turbocharge your website’s speed on both desktop and mobile, effortlessly fixing Google PageSpeed Insights issues and improving Core Web Vitals with just a single click.

With PageSpeed Ninja, you can easily:

  • Enable Gzip and Brotli file compression.
  • Resolve render-blocking CSS and JavaScript issues.
  • Improve Critical Rendering Path and automatically generate critical CSS for above-the-fold content.
  • Minify HTML, JavaScript, and CSS files.
  • Combine and inline JavaScript and CSS resources.
  • Defer the loading of JavaScript and CSS.
  • Optimize images.
  • Convert images to WebP and AVIF formats.
  • Implement lazy loading of images with optional low-quality image placeholders.
  • Optimize the loading of Google Fonts.
  • Leverage browser caching and server-side caching.
  • And MUCH more, based on our 10+ years of experience in mobile-optimizing over 200,000 websites.

Why Choose PageSpeed Ninja?

We’ve been at the forefront of mobile web optimization for over a decade now (you might be familiar with one of our popular projects, Lazy Load XT on GitHub). PageSpeed Ninja for WordPress is the culmination of our extensive expertise gained from optimizing the performance of over 200,000 websites on mobile devices. We believe you won’t find a similar, user-friendly, all-inclusive package of performance-boosting features anywhere else.

We’ve built heaps of unique features to ensure lightning-fast loading times for your site, such as our innovative above-the-fold critical CSS generation method and tagged page cache.

We’d love your feedback—please feel free to send us your questions, thoughts, and suggestions.

Before You Install

According to our stats, the plugin improves the speed of 4 out of 5 websites. However, in some cases, certain theme and plugin combinations (particularly related to caching and optimization) may result in compatibility issues. Therefore, our plugin might not be suitable for everyone. In order for you to see how PageSpeed Ninja could work for your site, we’ve created a simple tool where you can test your site before installation. We highly recommend that you visit PageSpeed.Ninja and test your site beforehand.

Uninstallation

When you delete the plugin, it will automatically revert all settings on your site to their original state before installing this plugin. It restores all optimized images and removes the /s directory containing optimized files. Also, any changes made to .htaccess files will be reversed.

Feedback, Bug Reports, and Logging Possible Issues

We welcome all questions, comments, suggestions, and issue reports. Contact us to be added to our private tester Facebook group.

PageSpeed Ninja can log all PHP errors in the wp-content/plugins/pagespeedninja/includes/error_log.php file (see the Troubleshooting section in the Advanced tab of the PageSpeed Ninja settings page).
If you find a problem, please consider sending us that file as well.

Screenshots

  • See improvement suggestions in one place and fix with single click
  • Fine tune to get the best performance using advanced settings

Installation

  1. Upload the plugin files to the /wp-content/plugins/psn-pagespeed-ninja directory, or install the plugin through the WordPress plugins screen directly. We highly recommend creating a backup of your site beforehand, just as you would when installing any new plugin.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress dashboard.
  3. Use the PageSpeed Ninja settings screen to configure the plugin to your preferences.
  4. After you have installed the plugin, navigate to PageSpeed Ninja and adjust optimization levels suggested by Google’s PageSpeed Insights (by default, all optimizations are enabled). The plugin will then optimize your images, JS and CSS files, and modify .htaccess files in order to fix issues identified by Google PageSpeed Insights.

FAQ

Does this plugin have any conflicts with Yoast or any of the other SEO plugins out there?

The PageSpeed Ninja plugin should work pretty well with most other plugins without issues. However, if some SEO plugins try to do some of the same things as this plugin, then conflicts could be possible especially if gzip compression is enabled. However, that is pretty unlikely.

Reviews

October 8, 2022 1 reply
Creates a folder "S" in the root of the site with suspicious content, as they say it's a cache. But the plugin was disabled in the admin panel, and the "cache" was created, why? Breaks sometimes completely at a random moment the layout on the site
April 12, 2022
Spectacular! you just have to know how to use your settings well, 99 on desktop and 62 on mobile
October 19, 2021
A pesar de que tiene un año sin actualizar funciona de maravilla! increíble cambio de velocidad que obtuvo mi web. Gracias a los que hacen posible esta gran herramienta.
July 8, 2021
Мобильный 56, я на других за 40 еле вылазил, 95 ПК - это просто супер. Спасибище!
Read all 108 reviews

Contributors & Developers

“PageSpeed Ninja” is open source software. The following people have contributed to this plugin.

Contributors

“PageSpeed Ninja” has been translated into 2 locales. Thank you to the translators for their contributions.

Translate “PageSpeed Ninja” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.0.rc.3 Release Candidate [03 October 2023]

  • Fixed update in multisite mode

1.0.rc.2 Release Candidate [03 October 2023]

  • Fixed processing of tagged cache updates with caching disabled

1.0.rc.1 Release Candidate [02 October 2023]

  • Added a notification message about the license key requirement for external Critical CSS generation
  • Fixed API key validation
  • Fixed aspect ratio of gradient LQIP images
  • Fixed processing of noscript tags by DOM HTML parser
  • Fixed chroma 4:2:0 support in PSN Pro
  • Fixed minor UI issues

1.0.beta.2 Beta release [20 September 2023]

  • Added an admin bar menu with options to clear the page cache and update critical CSS
  • Added new settings in the “Ensure text remains visible during webfont load” section: “Swap Web-fonts” and “Exclude Web-fonts”
  • Added support for fonts.bunny.net in addition to fonts.google.com in the “Google Fonts Loading”
  • Added new settings in the “JavaScript execution time” section: “Delay Async Scripts”, “Delay Scripts”, and “Delay Scripts List”
  • Moved the cache directory to wp-content/uploads/psn-pagespeed-ninja to ensure cache preservation during updates
  • Fixed UI issues
  • Implemented performance optimizations

1.0.beta.1 Beta Release [28 July 2023]

  • Big code refactoring and bugfixes release
  • Added API key support for external above-the-fold CSS generation
  • Added tagged page cache support

0.9.45 Beta Release [22 February 2023]

  • Fixed anonymous statistics collection
  • Updated AMDD database

0.9.44 Beta Release [17 November 2022]

  • Added “Global Above-the-fold CSS” option
  • Updated AMDD database
  • Fixed compatibility with PHP8
  • Minor bugfixes

0.9.43 Beta Release [29 August 2020]

  • Fixed possible error during deactivation

0.9.42 Beta Release [29 August 2020]

  • Fixed conflict with AMP plugin
  • Fixed issue with infinite loading animation for local websites

0.9.41 Beta Release [6 July 2020]

  • Fixed loading of PageSpeed Insights scores via API v5 (usability score is set to 100)
  • Changed Google Fonts loading for “Flash of unstyled text” mode via display=swap

0.9.40 Beta Release [1 December 2019]

  • Fixed compatibility with PHP 7.4 in CSSTidy minifier

0.9.39 Beta Release [13 November 2019]

  • Fixed compatibility with WP 5.3
  • Fixed URL parsing in “Optimize integrations”
  • Fixed lazy image loading

0.9.38 Beta Release [30 April 2019]

  • Fixed issue with exclusion of JavaScript files
  • Fixed issue with priority of template_redirect action handler (resulted in conflict with Smart Slider 3)
  • Fixed issue with processing of AJAX requests
  • Fixed issue with page caching for logged users
  • Fixed issue with file cache cleaner in the case of large time-to-live value
  • Fixed work of “Configure the viewport” setting
  • Fixed work of libxml-based HTML optimizer
  • Added new setting to enable/disable optimization for logged users
  • Added file exclusion in “Non-blocking Javascript”, “Optimize integrations”, “Load external stylesheets”, and “Load external scripts”
  • Registering of new WP images sizes is applied to the “Fit” image rescaling method only

0.9.37 Beta Release [12 February 2019]

  • Fixed issue with Distribute Method: PHP

0.9.36 Beta Release [12 February 2019]

  • Fixed file permissions

0.9.35 Beta Release [12 February 2019]

  • Fixed issue with possible incorrect markup generation in DNS Prefetch and Google Fonts optimizations
  • Fixed issue with WooCommerce caching
  • Fixed issue with open_basedir enabled
  • Updated AMDD device database for “Scale large images” feature
  • Improved atomic file operations

0.9.34 Beta Release [21 December 2018]

  • Fixed version number in WordPress repository

0.9.33 Beta Release [21 December 2018]

  • Fixed issue in URL parser
  • Fixed processing of inlined scripts in libxml-based HTML parser

0.9.32 Beta Release [29 November 2018]

  • Fixed processing of xml (e.g. in sitemap)
  • Removed copyright headers from minified Lazy Load XT files
  • Improvement of “Skip initialization scripts” setting

0.9.31 Beta Release [13 September 2018]

  • Fixed gzip compression for “headers sent” issue
  • Fixed displaying of active preset name
  • Fixed removing of empty directories in cache cleaner
  • Fixed libxml HTML parser
  • Added support of DONOTCACHEPAGE and DONOTMINIFY constants
  • Improved performance of the Standard full HTML parser (Pharse library)
  • Few minor fixes

0.9.30 Beta Release [16 July 2018]

  • Fixed conflict of “Manage CSS/Javascript URLs” and “Load external stylesheets/scripts” settings
  • Fixed “Gzip compression” feature for cached pages
  • Fixed internal caching TTL (detached from “Caching time-to-live” parameter)
  • Automatic detection of gzip support during initial activation of the plugin

0.9.29 Beta Release [02 July 2018]

  • Fixed invalidation of expired page cache after clearing fragment cache
  • Fixed invalidation of page cache after saving settings
  • Fixed work with Beaver Builder and Massive Dynamic Builder
  • Changed default cache time-to-live in presets
  • “Generate srcset” feature is moved from experimental to stable

0.9.28 Beta Release [27 June 2018]

  • Fixed issue with image rescaling
  • “Generate srcset” feature is moved from experimental to stable

0.9.27 Beta Release [25 June 2018]

  • Fixed external Above-the-fold CSS generation in backend
  • Fixed issue with merging of non-existing files
  • Fixed merging of JS/CSS URLs with hash-part in URL
  • Fixed conflict with ob-handlers ordering
  • Added experimental caching of optimized pages
  • Added HTTPS support for all requests to pagespeed.ninja
  • Added tooltips displaying for touch screens in Advanced tab
  • Updated TidyCSS to ver. 1.5.7 from https://github.com/airyland/CSSTidy
  • Updated presets
  • Performance optimizations

0.9.26 Beta Release [14 June 2018]

  • Fixed “Flash of unstyled text” mode of Google Fonts loading
  • Fixed position of the Support badge
  • Fixed conflict with plugins that do ob_start() in ‘template_redirect’ action (by setting priority to 5)
  • Fixed generation of absolute URLs in merged CSS files

0.9.25 Beta Release [09 May 2018]

  • Fixed javascript order with “Skip initialization scripts” option

0.9.24 Beta Release [08 May 2018]

  • Fixed URL quoting in CSS minification

0.9.23 Beta Release [07 May 2018]

  • Fixed Fast stream and libxml parsers
  • Fixed work of Above-the-fold CSS with libxml parser

0.9.22 Beta Release [06 May 2018]

  • Fixed “Configure the viewport” feature
  • Fixed “Load external files” feature
  • Fixed clearing of Page Cache
  • Fixed generation of above-the-fold CSS in the Advanced tab
  • Fixed check for AMP pages
  • Fixed processing of inlined tags with CDATA wrapping
  • Added new optimization feature: Skip initialization scripts
  • Added support of Cache-Control:immutable header for generated files
  • Updated AMDD database
  • Default JPEG quality level is set to 85 (95 in Safe preset)
  • Options to load external CSS and JS are moved to “Leverage browser caching” section

0.9.21 Beta Release [20 March 2018]

  • Fixed issue with editing of theme files
  • Fixed loading and caching of external files
  • Fixed backend rendering issues
  • Fixed issue with onload/onerror attributes and async javascript loading
  • Fixed issue with onload/onerror attributes and lazy image loading
  • Fixed libxml HTML parser
  • Fixed CSS parser
  • Fixed URL minification in rel attribute of tag (rel=stylesheet allowed only)
  • Fixed gzip compression in the case of enabled ob_gzhandler
  • Fixed uninstallation of advanced-cache.php
  • Fixed issue with initialization of lazy image loading
  • Fixed processing of “id” attribute in tags
  • Added select of preset in the after-install popup
  • Added new settings preset: “Compact”
  • Added descriptions for presets
  • Improved compression of JPEG images
  • Improved Troubleshooting section in Advanced settings
  • Improved detection of the “Distribute method” after initial plugin activation
  • Improved cleaning up of outdated cache files and directories
  • Disabled optimization of AMP pages
  • Disabled optimizations prior to apply profile preset

0.9.20 Beta Release [22 February 2018]

  • Fixed pre-check of free memory amount in GD image rescaling and optimizing
  • Improved Imagick image compression
  • Minor performance improvements
  • Updated tooltips in Advanced settings

0.9.19 Beta Release [15 January 2018]

  • Fixed rebasing of CSS in the “Load external files” mode
  • Fixed conflict of http and https caches
  • Added option to merge embedded scripts and styles in section only
  • Added warning about conflict of advanced caching and WooCommerce

0.9.18 Beta Release [03 January 2018]

  • Fixed blank screen issue
  • Fixed issue with incorrect URLs in optimized css files
  • Improved Google Fonts loading

0.9.17 Beta Release [07 December 2017]

  • Fixed issue with Google Fonts loading

0.9.16 Beta Release [06 December 2017]

  • Caching of PageSpeed Insights scores
  • Improved Google Fonts loading
  • Fixed javascript processing in “Optimize integrations” feature
  • Fixed lazy loading with some slider plugins
  • Fixed issues with above-the-fold css and async css loading

0.9.15 Beta Release [15 November 2017]

  • Fixed issues with nonblocking CSS loader

0.9.14 Beta Release [14 November 2017]

  • Fixed merging of JavaScript
  • Fixed merging of CSS
  • Fixed CSS parser
  • Fixed processing of @import in CSS optimizer
  • Fixed parsing of tag in HTML5 parser
  • Fixed nonblocking css and js in IE6-8
  • Fixed lazy image loading in IE8
  • Fixed conflict with few plugins that use lazy image loading
  • Fixed issue with hidden switches in backend settings page
  • Fixed conflict of the Masonry library and asynchronous css loading
  • Added Autogeneration of srcset attribute for lazy image loading
  • Added cache reset after post/page/attachment/theme changes
  • Disabled optimization of comment feeds

0.9.13 Beta Release [10 October 2017]

  • Fixed backend interface
  • Enabled optimizations by default
  • Reset js/css cache after update

0.9.12 Beta Release [10 October 2017]

  • Fixed processing of @import rules in css files
  • Fixed error in config reading
  • Fixed Fatal error in libxml HTML parser
  • Fixed Fatal error in loadATFCSS()

0.9.11 Beta Release [09 October 2017]

  • Fixed error message during uninstallation
  • Fixed warning message in the case of disabled js and css minification
  • Added lazy loading of iframes
  • Updated presets
  • Updated AMDD database
  • Changed configuration file format to allow plugin to be translated to other languages

0.9.10 Beta Release [30 September 2017]

  • Fixed text domain slug
  • Fixed issue with quoted keyframe name in css parser
  • Fixed disabling of caching for logged-in users
  • Fixed disabling of non-blocking js mode
  • Improved estimation of required memory in image processing
  • Reduced memory usage by css optimizer
  • Switched remote connections to use download_url function

0.9.9 Beta Release [27 September 2017]

  • Marked as tested with WordPress 4.8.2
  • Fixed undefined index in abovethefoldcss.php
  • Removed unused jQLight option

0.9.8 Beta Release [27 September 2017]

  • Fixed render blocking issues
  • Fixed image lazy loading with Fast simple HTML parser
  • Fixed Google Fonts loading
  • Added check of memory limit in image optimization and rescaling
  • Added new lazy loading script (Lazy Load XT 2.0)
  • Minor backend changes

0.9.7 Beta Release [06 September 2017]

  • Marked as tested with WordPress 4.8.1

0.9.6 Beta Release [05 September 2017]

  • Switched to native updating

0.9.5 Beta Release [27 August 2017]

  • Added optimization of srcset attribute in images
  • Added support of HTTP/2 Server Push
  • Fixed “Viewport width” feature
  • Fixed “DNS prefetch” feature in the “Fast simple” HTML parser mode
  • Fixed Google Font optimization

0.9.4 Beta Release [23 July 2017]

  • Added request to allow using of external pagespeed.ninja critical CSS service and to send usage data
  • Removed update from versions prior to 0.8.23 (first public alpha release)
  • Moved “Optimize Emoji loading” option to “Minify JavaScript” section

0.9.3 Beta Release [03 July 2017]

  • Fixed lazy image loading in the “stream” optimizer mode
  • Improved settings page for small/medium screen width
  • Colors of switches depend on diference between original and current scores
  • Updated AMDD database

0.9.2 Beta Release [20 June 2017]

  • Added preview of results (without affecting website for other users)
  • Added “Optimize Emoji Loading” feature
  • Added “Google Fonts loading” feature
  • Added “Skip first images” and “Noscript position” features to fine tune lazy image loading
  • Added support of ImageMagick PHP extensions for image optimization
  • Fixed processing of non-standard JPEG and PNG images
  • Fixed CSS parser
  • Fixed issue with merging of subsequent javascripts before
  • Fixed merging of Javascript and CSS in the “stream” optimizer mode
  • Fixed merging of Javascript and CSS with “onload” attribute
  • Fixed processing of tags
  • Fixed dnsprefetch generation
  • Fixed timeout issue in the plugin activation
  • Added set width and height attributes for lazy loading images
  • Fixed loading of URLs starting with “//”
  • Fixed settings page in older browsers
  • Fixed several minor issues
  • Improved performance of local above-the-fold css generation
  • Google fonts are loaded synchronously by default
  • Excluded Google Analytics from “Non-blocking Javascript” feature
  • Default limits of inlined Javascript and CSS are set to 4096 bytes

0.9.1 Beta Release [07 April 2017]

  • Added “Clear Cache” and “Clear Database Cache” button to the Troubleshooting section
  • Fixed Manage URLs feature in Troubleshooting section
  • Fixed automatical cache clearing

0.9.0 Beta Release [04 April 2017]

  • New backend design
  • “Troubleshooting” section in Advanced settings
  • Fixed image lazy loading in “stream” html optimizer
  • Fixed in-browser generation of above-the-fold css
  • Fixed “Exclude files list” feature
  • Added notification about unsaved changes
  • Added notification about generated above-the-fold css
  • Minor performance improvements
  • Updated AMDD database

0.8.27 Alpha Release [01 December 2016]

  • Added server-side page caching implementation
  • Fixed activation of image optimization and lazy loading settings
  • Minor performance improvements
  • Updated AMDD database

0.8.26 Alpha Release [08 November 2016]

  • Significant code refactoring
  • Performance improvements
  • Added “Experimental” preset
  • Added loading animation for Google’s Page Speed scores in backend
  • Fixed PHP warnings in plugin activation/deactivation
  • Fixed few Windows-related issues
  • Removed “Avoid app install interstitials that hide content” section (removed by Google’s Page Speed service)
  • Moved image lazy loading settings to “Prioritize visible content” section

0.8.25 Alpha Release [07 October 2016]

  • Fixed few PHP warnings and notices
  • Enabled logging for backend settings page and frontend pages only
  • Added compatibility with caching plugins
  • Added “Auto” option for “Load jQLight library” setting
  • Other minor changes

0.8.24 Alpha Release [04 October 2016]

  • Added notice about compatibility with caching plugins
  • Uninstall of the plugin deletes generated low-quality image placeholders and gzipped svg images

0.8.23 Alpha Release [21 September 2016]

  • Significant code refactoring
  • Added error logging to includes/error_log.php
  • Added “Low-quality image placeholders” setting
  • Added “Vertical lazy loading threshold” setting
  • Updated AMDD database
  • Other minor changes

0.8.22 Alpha Release [14 July 2016]

  • First pre-public alpha release. Distributed privately.