84% contact-form-7-simple-recaptcha

Code Review | Contact Form 7 Captcha

WordPress plugin Contact Form 7 Captcha scored84%from 54 tests.

About plugin

  • Plugin page: contact-form-7-si...
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.2-6.3
  • WordPress version: 6.3.1
  • First release: Feb 20, 2015
  • Latest release: Aug 11, 2023
  • Number of updates: 48
  • Update frequency: every 64.5 days
  • Top authors: 247wd (100%)

Code review

54 tests

User reviews

39 reviews

Install metrics

100,000+ active /659,590 total downloads

Benchmarks

Plugin footprint 83% from 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: ▼2.42ms] 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 /3.49 ▲0.0337.11 ▼6.25
Dashboard /wp-admin3.33 ▲0.0345.01 ▼6.59
Posts /wp-admin/edit.php3.39 ▲0.0345.56 ▲0.23
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.83 ▲2.92
Media Library /wp-admin/upload.php3.26 ▲0.0335.86 ▲3.44
CF7 Simple Recaptcha /wp-admin/options-general.php?page=cf7sr_edit3.2229.27

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, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

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 /2,793 ▲714.29 ▼0.101.71 ▼0.1341.85 ▼1.51
Dashboard /wp-admin2,202 ▲255.62 ▲0.0484.99 ▼14.6444.25 ▼9.82
Posts /wp-admin/edit.php2,104 ▲71.99 ▲0.0333.96 ▼1.3333.63 ▼4.44
Add New Post /wp-admin/post-new.php1,531 ▲523.14 ▲0.00625.95 ▼45.0857.10 ▼7.90
Media Library /wp-admin/upload.php1,404 ▲74.23 ▲0.1294.60 ▼0.9140.91 ▼5.20
CF7 Simple Recaptcha /wp-admin/options-general.php?page=cf7sr_edit7651.9923.6422.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

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: contact form 7, recaptcha, captcha, new recaptcha, no captcha

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

"Contact Form 7 Captcha" version 0.1.2'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%