76% jetpack

Code Review | Jetpack - WP Security, Backup, Speed, & Growth

WordPress plugin Jetpack - WP Security, Backup, Speed, & Growth scored 76% from 54 tests.

About plugin

  • Plugin page: jetpack
  • Plugin version: 10.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.9
  • WordPress version: 5.9.2
  • First release: Jan 20, 2011
  • Latest release: Feb 28, 2022
  • Number of updates: 3,649
  • Update frequency: every 1.1 days
  • Top authors: jeherve (12.99%)georgestephanis (10.74%)mdawaffe (10.22%)tmoorewp (8.06%)cfinke (6.58%)

Code review

54 tests

User reviews

1744 reviews

Install metrics

5,000,000+ active / 267,337,913 total downloads


Plugin footprint 81% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲7.74MB] [CPU: ▼257.61ms] 25% from 4 tests

Analyzing server-side resources used by Jetpack - WP Security, Backup, Speed, & Growth
Please fix the following
  • RAM: Try to keep total memory usage under 10MB (currently 10.95MB on /wp-admin/admin.php?page=jetpack-debugger)
  • CPU: You should keep total CPU usage under 500.00ms (currently 762.51ms on /wp-admin/admin.php?page=jetpack-debugger)
  • Extra RAM: The extra memory usage should kept under 5MB (currently 7.74MB on /wp-admin/admin.php?page=jetpack-debugger)
PageMemory (MB)CPU Time (ms)
Home /11.69 ▲8.1778.85 ▲23.96
Dashboard /wp-admin11.02 ▲7.6179.82 ▲36.95
Posts /wp-admin/edit.php11.23 ▲7.5975.62 ▲35.32
Add New Post /wp-admin/post-new.php15.79 ▲8.82145.98 ▼1,126.68
Media Library /wp-admin/upload.php10.88 ▲7.5963.18 ▲38.23

Server storage [IO: ▲25.97MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • The filesystem usage should be lower than 25MB (currently using 25.97MB)
Filesystem: 2,021 new files
Database: no new tables, 9 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Jetpack - WP Security, Backup, Speed, & Growth
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,244 ▲50016.55 ▲0.886.86 ▲0.132.40 ▲0.27
Dashboard /wp-admin3,157 ▲2996.39 ▲0.14125.08 ▼43.24202.07 ▲20.89
Posts /wp-admin/edit.php2,718 ▲303.41 ▲0.3764.23 ▼1.84142.25 ▼12.90
Add New Post /wp-admin/post-new.php1,669 ▼4818.41 ▼2.66482.68 ▲27.55149.27 ▼7.31
Media Library /wp-admin/upload.php1,864 ▲1665.61 ▲0.16143.88 ▼1.75223.34 ▲24.41

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 2 options
    • do_activate
    • jetpack_connection_active_plugins

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/jetpack/extensions/blocks/podcast-player/templates/podcast-header.php
    • > /wp-content/plugins/jetpack/views/admin/jetpack-plugin-portal-containers.php
  • 687× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: waf in wp-content/plugins/jetpack/vendor/automattic/jetpack-waf/rules/rules.php on line 6
    • > PHP Warning
      require_once(JETPACK__PLUGIN_DIRclass.jetpack-modules-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/jetpack/_inc/lib/admin-pages/class.jetpack-settings-page.php on line 7
    • > PHP Notice
      Undefined variable: template_props in wp-content/plugins/jetpack/extensions/blocks/podcast-player/templates/playlist-track.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'WPCOM_JSON_API_Update_Post_v1_2_Endpoint' not found in wp-content/plugins/jetpack/json-endpoints/class.wpcom-json-api-update-post-v1-2-endpoint.php:3
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/jetpack/json-endpoints/jetpack/class.jetpack-json-api-plugins-new-endpoint.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WPCOM_JSON_API_GET_Comment_Counts_Endpoint' not found in wp-content/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-comment-counts-endpoint.php:6
    • > PHP Warning
      require_once(wp-content/plugins/jetpack/mu-plugins/keyring/keyring.php): failed to open stream: No such file or directory in wp-content/plugins/jetpack/modules/publicize.php on line 47
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/jetpack/modules/tiled-gallery/tiled-gallery/templates/partials/item.php:3
    • > PHP Warning
      Use of undefined constant MINUTE_IN_SECONDS - assumed 'MINUTE_IN_SECONDS' (this will throw an Error in a future version of PHP) in wp-content/plugins/jetpack/modules/sitemaps/sitemap-constants.php on line 92
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jetpack/modules/protect.php:51

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Jetpack Security provides easy-to-use, comprehensive WordPress site security including backups, malware scanning, and spam protection.)
The official readme.txt might help

jetpack/jetpack.php 92% from 13 tests

Analyzing the main PHP file in "Jetpack - WP Security, Backup, Speed, & Growth" version 10.7
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 146 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin221,378 lines of code in 1,697 files:
LanguageFilesBlank linesComment linesLines of code

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 235)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity30.52
▷ Minimum class complexity1.00
▷ Maximum class complexity708.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity235.00
Code structure
▷ Abstract classes365.10%
▷ Concrete classes67094.90%
▷ Final classes10.15%
▷ Static methods2,03327.97%
▷ Public methods5,95881.98%
▷ Protected methods78210.76%
▷ Private methods5287.26%
▷ Named functions89588.18%
▷ Anonymous functions12011.82%
▷ Global constants11026.63%
▷ Class constants30373.37%
▷ Public constants303100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
148 PNG files occupy 2.66MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
_inc/blocks/images/paypal-button-2x-62cd99bcc3acbd1ff504.png23.41KB6.82KB▼ 70.87%
modules/sharedaddy/images/smart-twitter.png1.91KB1.64KB▼ 14.19%
modules/contact-form/images/grunion-remove-option-2x.png0.10KB0.09KB▼ 5.05%