94% mw-wp-form-recaptcha

Code Review | MW WP Form reCAPTCHA

WordPress plugin MW WP Form reCAPTCHA scored 94% from 54 tests.

About plugin

  • Plugin page: mw-wp-form-recaptcha
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.9.1
  • WordPress version: 5.8.1
  • First release: Oct 29, 2015
  • Latest release: Dec 25, 2017
  • Number of updates: 23
  • Update frequency: every 34.3 days
  • Top authors: ryu263 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

3,000+ active / 11,659 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼146.52ms] Passed 4 tests

An overview of server-side resources used by MW WP Form reCAPTCHA
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1238.83 ▲11.63
Dashboard /wp-admin3.06 ▲0.0148.35 ▲3.89
Posts /wp-admin/edit.php3.11 ▲0.0145.44 ▲0.37
Add New Post /wp-admin/post-new.php5.42 ▼0.0195.68 ▼592.43
Media Library /wp-admin/upload.php3.01 ▲0.0036.89 ▲2.09

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for MW WP Form reCAPTCHA
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,727 ▲13116.55 ▲0.5318.15 ▲5.6359.07 ▲4.52
Dashboard /wp-admin2,985 ▲545.85 ▼0.13150.95 ▼7.84128.70 ▲6.33
Posts /wp-admin/edit.php2,754 ▲152.83 ▲0.1271.52 ▲2.7597.80 ▲0.08
Add New Post /wp-admin/post-new.php1,693 ▼1,99618.83 ▲3.77383.00 ▼98.83120.65 ▼6.26
Media Library /wp-admin/upload.php1,822 ▲155.00 ▼0.03151.58 ▼20.58124.46 ▼5.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mw-wp-form-recaptcha/mw-wp-form-recaptcha.php:30

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (MW WP Form reCAPTCHA) image not found
You can take inspiration from this readme.txt

mw-wp-form-recaptcha/mw-wp-form-recaptcha.php Passed 13 tests

"MW WP Form reCAPTCHA" version 1.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
34 characters long description:
Adds reCAPTCHA field to MW WP Form

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
Everything looks great! No dangerous files found in this plugin107 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1202682
PO File16825

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.06MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png64.00KB4.58KB▼ 92.85%