78% text-captcha-contact-form-7

Code Review | Contact Form 7 Text CAPTCHA

WordPress plugin Contact Form 7 Text CAPTCHA scored78%from 54 tests.

About plugin

  • Plugin page: text-captcha-cont...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.2-6.3
  • WordPress version: 6.3.1
  • First release: Jan 20, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 10
  • Update frequency: every 56.6 days
  • Top authors: sauravhny (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /2,341 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Contact Form 7 Text CAPTCHA
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.11 ▲0.04
Dashboard /wp-admin3.31 ▼0.0343.55 ▼16.48
Posts /wp-admin/edit.php3.36 ▲0.0142.53 ▼4.39
Add New Post /wp-admin/post-new.php5.89 ▲0.0178.14 ▼27.65
Media Library /wp-admin/upload.php3.23 ▲0.0131.99 ▲0.42

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form 7 Text CAPTCHA
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.011.73 ▲0.0644.31 ▲3.03
Dashboard /wp-admin2,195 ▲275.54 ▼0.1280.28 ▼8.2436.19 ▼6.33
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0133.89 ▼5.3232.27 ▼4.31
Add New Post /wp-admin/post-new.php1,526 ▼023.26 ▲0.09569.34 ▼70.9755.91 ▼1.37
Media Library /wp-admin/upload.php1,397 ▼64.10 ▼0.1495.40 ▼2.6841.87 ▲0.68

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/text-captcha-contact-form-7/include/image.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/text-captcha-contact-form-7/index.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: captcha, contact form 7, recaptcha, spam protection, text-captcha

text-captcha-contact-form-7/index.php 92% from 13 tests

The entry point to "Contact Form 7 Text CAPTCHA" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("text-captcha-contact-form-7.php" instead of "index.php")

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
There were no executable files found in this plugin200 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24534142
JavaScript11140
CSS10018

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
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%
Functions5
▷ Named functions5100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/refresh.png0.89KB0.80KB▼ 9.37%