84% text-captcha-for-contact-form-7

Code Review | Text Captcha For Contact Form 7 [GWE]

WordPress plugin Text Captcha For Contact Form 7 [GWE] scored84%from 54 tests.

About plugin

  • Plugin page: text-captcha-for-...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 7, 2022
  • Latest release: Dec 3, 2023
  • Number of updates: 9
  • Update frequency: every 57.1 days
  • Top authors: mukulwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /487 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.04ms] Passed 4 tests

An overview of server-side resources used by Text Captcha For Contact Form 7 [GWE]
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.18 ▼5.78
Dashboard /wp-admin3.35 ▲0.0448.72 ▼2.93
Posts /wp-admin/edit.php3.47 ▲0.1047.77 ▲1.87
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.37 ▼1.31
Media Library /wp-admin/upload.php3.28 ▲0.0434.94 ▲2.41
Text Captcha For Contact Form 7 /wp-admin/options-general.php?page=cf7tc3.2430.97

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Text Captcha For Contact Form 7 [GWE]
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6114.22 ▲0.072.30 ▲0.6240.15 ▼3.88
Dashboard /wp-admin2,199 ▲225.62 ▲0.0489.79 ▼9.2239.12 ▼2.05
Posts /wp-admin/edit.php2,107 ▲72.00 ▲0.0037.60 ▲0.0635.86 ▼3.72
Add New Post /wp-admin/post-new.php1,529 ▲323.24 ▼0.32609.57 ▼38.1958.92 ▼3.93
Media Library /wp-admin/upload.php1,404 ▲104.22 ▼0.0994.50 ▼8.0740.34 ▼1.70
Text Captcha For Contact Form 7 /wp-admin/options-general.php?page=cf7tc7902.0026.8125.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/text-captcha-for-contact-form-7/contact-form-7-text-captcha.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: recaptcha, captcha, text-captcha, spam protection, contact form 7

text-captcha-for-contact-form-7/contact-form-7-text-captcha.php 85% from 13 tests

"Text Captcha For Contact Form 7 [GWE]" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("text-captcha-for-contact-form-7.php" instead of "contact-form-7-text-captcha.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected212 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12813146
JavaScript113142
CSS11024

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin