83% recaptcha-for-mw-wp-form

Code Review | reCAPTCHA for MW WP Form

WordPress plugin reCAPTCHA for MW WP Form scored83%from 54 tests.

About plugin

  • Plugin page: recaptcha-for-mw-...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 17, 2020
  • Latest release: Oct 23, 2023
  • Number of updates: 9
  • Update frequency: every 135.9 days
  • Top authors: kanakogi (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20,000+ active /52,961 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲1.74ms] Passed 4 tests

An overview of server-side resources used by reCAPTCHA for MW WP Form
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.48 ▲2.85
Dashboard /wp-admin3.32 ▲0.0149.74 ▲4.66
Posts /wp-admin/edit.php3.37 ▲0.0146.09 ▲1.80
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.94 ▼2.34
Media Library /wp-admin/upload.php3.24 ▲0.0145.76 ▲11.68

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for reCAPTCHA for MW WP Form
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.271.73 ▲0.1444.46 ▲2.11
Dashboard /wp-admin2,195 ▲185.64 ▼0.0284.92 ▼1.4238.62 ▼6.39
Posts /wp-admin/edit.php2,097 ▼61.95 ▼0.0638.65 ▲2.5832.06 ▲1.41
Add New Post /wp-admin/post-new.php1,526 ▼1223.55 ▲0.27700.13 ▲22.6949.51 ▼5.89
Media Library /wp-admin/upload.php1,400 ▼04.28 ▲0.08106.79 ▼8.2045.09 ▼4.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/recaptcha-for-mw-wp-form/recaptcha-for-mw-wp-form.php on line 18
    • > PHP Fatal error
      Uncaught Error: Class 'MW_WP_Form_Abstract_Validation_Rule' not found in wp-content/plugins/recaptcha-for-mw-wp-form/classes/recaptcha-v3.php:9
    • > PHP Notice
      Undefined variable: result in wp-content/plugins/recaptcha-for-mw-wp-form/views/admin.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'MW_WP_Form_reCAPTCHA\\Controllers\\Controller' not found in wp-content/plugins/recaptcha-for-mw-wp-form/controllers/AdminController.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/recaptcha-for-mw-wp-form/views/admin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/recaptcha-for-mw-wp-form/recaptcha-for-mw-wp-form.php:19
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/recaptcha-for-mw-wp-form/recaptcha-for-mw-wp-form.php on line 18
    • > PHP Fatal error
      Uncaught Error: Class 'MW_WP_Form_reCAPTCHA\\Classes\\Util' not found in wp-content/plugins/recaptcha-for-mw-wp-form/classes/functions.php:7
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/recaptcha-for-mw-wp-form/recaptcha-for-mw-wp-form.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: A description for screenshot #1 is missing in recaptcha-for-mw-wp-form/assets to your readme.txt
  • Requires at least: Invalid plugin version format
You can take inspiration from this readme.txt

recaptcha-for-mw-wp-form/recaptcha-for-mw-wp-form.php 92% from 13 tests

The main PHP file in "reCAPTCHA for MW WP Form" ver. 1.1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin389 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP107497367
PO File14522

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity5.33
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods22
▷ Static methods522.73%
▷ Public methods1881.82%
▷ Protected methods313.64%
▷ Private methods14.55%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/admin/pic-1.png59.40KB19.12KB▼ 67.81%
assets/img/admin/pic-0.png29.20KB9.24KB▼ 68.35%