72% jetpack-protect

Code Review | Jetpack Protect

WordPress plugin Jetpack Protect scored72%from 54 tests.

About plugin

Code review

54 tests

User reviews

72 reviews

Install metrics

100,000+ active /647,464 total downloads


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 gracefully, with no errors

Server metrics [RAM: ▲3.22MB] [CPU: ▲16.34ms] 75% from 4 tests

This is a short check of server-side resources used by Jetpack Protect
Please have a look at the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 636.87ms on /wp-admin/admin.php?page=jetpack-protect)
PageMemory (MB)CPU Time (ms)
Home /7.76 ▲4.3045.16 ▲8.63
Dashboard /wp-admin6.41 ▲3.1062.74 ▲15.59
Posts /wp-admin/edit.php6.46 ▲3.1061.41 ▲15.16
Add New Post /wp-admin/post-new.php9.47 ▲3.58125.76 ▲31.54
Media Library /wp-admin/upload.php6.33 ▲3.1058.86 ▲25.96
My Jetpack /wp-admin/admin.php?page=my-jetpack7.07996.75
Protect /wp-admin/admin.php?page=jetpack-protect7.20636.87

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 388 new files
Database: no new tables, 12 new options
New WordPress options

Browser metrics Passed 4 tests

Jetpack Protect: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲7614.59 ▲0.242.99 ▲1.4538.97 ▼0.71
Dashboard /wp-admin2,243 ▲665.68 ▲0.0697.02 ▲14.1644.99 ▼0.75
Posts /wp-admin/edit.php2,153 ▲532.20 ▲0.2336.64 ▼0.0632.12 ▼2.74
Add New Post /wp-admin/post-new.php1,547 ▲2122.85 ▼0.20633.47 ▼30.9851.20 ▼6.96
Media Library /wp-admin/upload.php1,448 ▲484.30 ▲0.0195.61 ▼2.8643.82 ▼3.22
My Jetpack /wp-admin/admin.php?page=my-jetpack1,24310.80263.4343.11
Protect /wp-admin/admin.php?page=jetpack-protect1,1447.7793.7943.82

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_theysaidso_widget
    • jetpack_options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • jetpack_connection_active_plugins
    • widget_recent-comments
    • jetpack-protect_activated

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/bench/bench.php
    • > /wp-content/plugins/jetpack-protect/vendor/wikimedia/aho-corasick/bench/check.php
  • 62× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\Sync\\Modules\\Module' not found in wp-content/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync-immediately.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\Sync\\Replicastore\\Table_Checksum' not found in wp-content/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/replicastore/class-table-checksum-users.php:13
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/class-IXR.php' (include_path='.:/usr/share/php') in wp-content/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\My_Jetpack\\Product' not found in wp-content/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-protect.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\Sync\\Modules\\Module' not found in wp-content/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-terms.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\Sync\\Modules\\Module' not found in wp-content/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-constants.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\Sync\\Modules\\Module' not found in wp-content/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-network-options.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\My_Jetpack\\Module_Product' not found in wp-content/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-my-jetpack/src/products/class-scan.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\Sync\\Modules\\Module' not found in wp-content/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-full-sync.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\Sync\\Modules\\Module' not found in wp-content/plugins/jetpack-protect/jetpack_vendor/automattic/jetpack-sync/src/modules/class-menus.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > 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)


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: security, malware, scan, jetpack, protect

jetpack-protect/jetpack-protect.php Passed 13 tests

"Jetpack Protect" version 1.4.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
73 characters long description:
Security tools that keep your site safe and sound, from posts to plugins.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin45,519 lines of code in 317 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity23.54
▷ Minimum class complexity1.00
▷ Maximum class complexity294.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
▷ Abstract classes41.93%
▷ Concrete classes20398.07%
▷ Final classes00.00%
▷ Static methods94739.99%
▷ Public methods2,10889.02%
▷ Protected methods1034.35%
▷ Private methods1576.63%
▷ Named functions45.00%
▷ Anonymous functions7695.00%
▷ Global constants198.96%
▷ Class constants19391.04%
▷ Public constants193100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 compressed PNG files occupy 1.06MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jetpack_vendor/automattic/jetpack-my-jetpack/build/images/connect-f27775ac15cf885713c2.png60.55KB35.14KB▼ 41.96%