94% contact-form-7-simple-recaptcha

Code Review | Contact Form 7 Captcha

WordPress plugin Contact Form 7 Captcha scored 94% from 54 tests.

About plugin

  • Plugin page: contact-form-7-si...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.2-5.8
  • WordPress version: 5.8.1
  • First release: Feb 20, 2015
  • Latest release: Aug 26, 2021
  • Number of updates: 44
  • Update frequency: every 54.1 days
  • Top authors: 247wd (100%)

Code review

54 tests

User reviews

36 reviews

Install metrics

100,000+ active / 465,358 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Contact Form 7 Captcha
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1432.00 ▲11.62
Dashboard /wp-admin3.09 ▲0.0346.77 ▲1.97
Posts /wp-admin/edit.php3.14 ▲0.0347.62 ▼2.83
Add New Post /wp-admin/post-new.php5.45 ▲0.0192.00 ▼566.04
Media Library /wp-admin/upload.php3.03 ▲0.0331.90 ▼4.08
CF7 Simple Recaptcha /wp-admin/options-general.php?page=cf7sr_edit3.0028.07

Server storage [IO: ▲0.06MB] [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: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Contact Form 7 Captcha: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.97 ▲0.019.92 ▲0.0652.32 ▲1.96
Dashboard /wp-admin2,978 ▲476.10 ▲0.14194.12 ▲45.32115.42 ▲3.45
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.1370.77 ▲6.3987.25 ▼0.59
Add New Post /wp-admin/post-new.php1,679 ▼1,95518.86 ▲3.81417.48 ▼92.45101.92 ▼10.13
Media Library /wp-admin/upload.php1,812 ▲55.03 ▼0.00150.78 ▲0.45114.03 ▼3.75
CF7 Simple Recaptcha /wp-admin/options-general.php?page=cf7sr_edit1,0062.0565.3258.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/contact-form-7-simple-recaptcha/contact-form-7-simple-recaptcha.php:9

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 issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: recaptcha, contact form 7, new recaptcha, no captcha, captcha

contact-form-7-simple-recaptcha/contact-form-7-simple-recaptcha.php Passed 13 tests

"Contact Form 7 Captcha" version 0.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
83 characters long description:
Add No CAPTCHA reCAPTCHA to Contact Form 7 using [cf7sr-simple-recaptcha] shortcode

Code Analysis Passed 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 plugin169 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2176169

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
donate.png5.40KB1.93KB▼ 64.28%