78% jetpack-boost

Code Review | Jetpack Boost - Website Speed, Performance and Critical CSS

WordPress plugin Jetpack Boost - Website Speed, Performance and Critical CSS scored78%from 54 tests.

About plugin

  • Plugin page: jetpack-boost
  • Plugin version: 2.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Dec 31, 2020
  • Latest release: Oct 31, 2023
  • Number of updates: 233
  • Update frequency: every 4.4 days
  • Top authors: jetpackisbestpack (51.07%)thingalon (21.03%)danwalmsley (9.44%)Adnan007 (7.3%)kraftbj (4.72%)

Code review

54 tests

User reviews

410 reviews

Install metrics

300,000+ active /3,276,641 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.66MB] [CPU: ▼3.45ms] 75% from 4 tests

A check of server-side resources used by Jetpack Boost - Website Speed, Performance and Critical CSS
Please fix the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 576.26ms on /wp-admin/admin.php?page=jetpack-boost)
PageMemory (MB)CPU Time (ms)
Home /5.15 ▲1.6933.09 ▼13.15
Dashboard /wp-admin3.95 ▲0.6053.94 ▼8.26
Posts /wp-admin/edit.php4.00 ▲0.6456.61 ▲12.01
Add New Post /wp-admin/post-new.php6.68 ▲0.8091.30 ▼3.28
Media Library /wp-admin/upload.php3.81 ▲0.5845.08 ▲10.90
Boost /wp-admin/admin.php?page=jetpack-boost4.25576.26
My Jetpack /wp-admin/admin.php?page=my-jetpack4.14486.05

Server storage [IO: ▲8.40MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 619 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
jetpack_connection_active_plugins
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
jetpack_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Jetpack Boost - Website Speed, Performance and Critical CSS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9414.43 ▼0.122.91 ▲1.2037.43 ▼6.90
Dashboard /wp-admin2,246 ▲715.78 ▲0.1396.78 ▼9.9637.55 ▼2.75
Posts /wp-admin/edit.php2,155 ▲552.19 ▲0.2143.19 ▲1.8834.75 ▼1.77
Add New Post /wp-admin/post-new.php1,550 ▲2223.43 ▲0.32637.71 ▲10.3962.79 ▲11.87
Media Library /wp-admin/upload.php1,454 ▲544.26 ▲0.09102.37 ▼8.3744.59 ▲0.04
Boost /wp-admin/admin.php?page=jetpack-boost1,3059.99299.1745.09
My Jetpack /wp-admin/admin.php?page=my-jetpack1,24910.97174.9239.05

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • jetpack_options
    • jetpack_connection_active_plugins
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 101× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Entry_Can_Get' not found in wp-content/plugins/jetpack-boost/jetpack_vendor/automattic/jetpack-wp-js-data-sync/src/class-data-sync-option.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Automattic\\Jetpack_Boost\\Compatibility\\AIOSEO\\add_filter() in wp-content/plugins/jetpack-boost/compatibility/aioseo.php:12
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/jetpack-boost/app/lib/minify/Config.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\My_Jetpack\\Product' not found in wp-content/plugins/jetpack-boost/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-hybrid-product.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'Automattic\\Jetpack\\WP_JS_Data_Sync\\Contracts\\Entry_Can_Get' not found in wp-content/plugins/jetpack-boost/app/data-sync/Modules_State_Entry.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Automattic\\Jetpack_Boost\\Compatibility\\Woocommerce\\add_filter() in wp-content/plugins/jetpack-boost/compatibility/woocommerce.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Automattic\\Jetpack_Boost\\Compatibility\\Web_Stories\\add_filter() in wp-content/plugins/jetpack-boost/compatibility/web-stories.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Automattic\\Jetpack_Boost\\REST_API\\Contracts\\Permission' not found in wp-content/plugins/jetpack-boost/app/rest-api/permissions/Nonce.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Automattic\\Jetpack\\Image_CDN\\Compatibility\\add_action() in wp-content/plugins/jetpack-boost/jetpack_vendor/automattic/jetpack-image-cdn/src/compatibility/activitypub.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\My_Jetpack\\Module_Product' not found in wp-content/plugins/jetpack-boost/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-stats.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=jetpack-boost
    • > Console-api (warning) in wp-content/plugins/jetpack-boost/app/assets/dist/jetpack-boost.js?ver=2.2.0+0:106302
    \u003CRouter> Could not find an element to focus. You should always render a header for accessibility reasons, or set a custom focus element via the \"useFocus\" hook. If you don't want this Route or Router to manage focus, pass \"primary={false}\" to it.\n\nOccurred in: \u003CRoute path=\"getting-started\" />
    • > GET request to /wp-admin/admin.php?page=my-jetpack
    • > Network (severe)
    index.php/wp-json/my-jetpack/v1/site/purchases?_locale=user - Failed to load resource: the server responded with a status of 400 (Bad Request)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: speed, defer, optimize, performance, critical css...

jetpack-boost/jetpack-boost.php 92% from 13 tests

The principal PHP file in "Jetpack Boost - Website Speed, Performance and Critical CSS" v. 2.2.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin68,346 lines of code in 544 files:
LanguageFilesBlank linesComment linesLines of code
CSS1153,8821,39930,424
PHP2946,25816,47125,989
Markdown532,40006,870
JSON28002,874
Svelte9774614
TypeScript789151481
JavaScript2274159461
Sass17616409
SVG1213167
XML36057

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity14.87
▷ Minimum class complexity1.00
▷ Maximum class complexity294.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity75.00
Code structure
Namespaces63
Interfaces17
Traits0
Classes228
▷ Abstract classes52.19%
▷ Concrete classes22397.81%
▷ Final classes41.79%
Methods1,777
▷ Static methods78043.89%
▷ Public methods1,55587.51%
▷ Protected methods824.61%
▷ Private methods1407.88%
Functions88
▷ Named functions5562.50%
▷ Anonymous functions3337.50%
Constants154
▷ Global constants1711.04%
▷ Class constants13788.96%
▷ Public constants137100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 1.39MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jetpack_vendor/automattic/jetpack-jitm/src/images/background.png23.54KB25.93KB0.00%
app/assets/static/images/super-cache.png2.19KB1.64KB▼ 24.97%
jetpack_vendor/automattic/jetpack-jitm/build/images/background-165b2f00927a762c8cf4.png23.54KB25.93KB0.00%
jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-ai-29e60474d5890cbb6889.png54.96KB27.61KB▼ 49.77%
jetpack_vendor/automattic/jetpack-my-jetpack/build/images/jetpack-license-activation-with-lock-7b01c1a4cf56de799cd7.png140.94KB52.80KB▼ 62.54%