79% recaptcha-jetpack

Code Review | reCAPTCHA Jetpack

WordPress plugin reCAPTCHA Jetpack scored79%from 54 tests.

About plugin

  • Plugin page: recaptcha-jetpack
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Jul 25, 2017
  • Latest release: Nov 21, 2017
  • Number of updates: 3
  • Update frequency: every 39.7 days
  • Top authors: bozdoz (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

700+ active /4,034 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.37ms] Passed 4 tests

Analyzing server-side resources used by reCAPTCHA Jetpack
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.68 ▼3.59
Dashboard /wp-admin3.35 ▲0.0047.68 ▼13.15
Posts /wp-admin/edit.php3.40 ▲0.0447.86 ▲3.78
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.69 ▼7.12
Media Library /wp-admin/upload.php3.27 ▲0.0433.94 ▲2.37
reCAPTCHA Jetpack /wp-admin/options-general.php?page=recaptcha-jetpack3.2432.93

Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
bozdoz_rjp_recaptcha_type
db_upgraded
widget_recent-comments
bozdoz_rjp_site_key
bozdoz_rjp_secret_key
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for reCAPTCHA Jetpack
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.30 ▼0.881.72 ▼0.0943.69 ▼0.47
Dashboard /wp-admin2,210 ▲225.88 ▼0.02108.61 ▲0.7440.78 ▲1.28
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0445.07 ▲8.0336.79 ▲2.01
Add New Post /wp-admin/post-new.php1,522 ▲823.15 ▲5.72618.92 ▼56.4549.62 ▼4.19
Media Library /wp-admin/upload.php1,389 ▲14.19 ▲0.01101.48 ▲1.9542.67 ▼1.27
reCAPTCHA Jetpack /wp-admin/options-general.php?page=recaptcha-jetpack8872.0223.3827.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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 everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/recaptcha-jetpack/admin/admin.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/recaptcha-jetpack/admin/admin.php on line 48
    • > PHP Notice
      Undefined variable: defaults in wp-content/plugins/recaptcha-jetpack/admin/admin.php on line 48
    • > PHP Notice
      Undefined variable: plugin_title in wp-content/plugins/recaptcha-jetpack/admin/admin.php on line 35

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

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: google, captcha, contact, jetpack, recaptcha

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

The main file in "reCAPTCHA Jetpack" v. 0.2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
102 characters long description:
A simple plugin that adds a Google reCAPTCHA to the Jetpack contact form. Requires the Jetpack plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin362 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP481178279
CSS15058
JavaScript18621
Markdown1304

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods529.41%
▷ Public methods1482.35%
▷ Protected methods00.00%
▷ Private methods317.65%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin