84% image-captcha-for-gravity-forms

Code Review | Image Captcha For Gravity Forms

WordPress plugin Image Captcha For Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: image-captcha-for...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.8
  • WordPress version: 6.3.1
  • First release: Nov 8, 2016
  • Latest release: Jul 16, 2021
  • Number of updates: 8
  • Update frequency: every 213.9 days
  • Top authors: KTC_88 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /3,323 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.66ms] Passed 4 tests

Server-side resources used by Image Captcha For Gravity Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.77 ▼1.14
Dashboard /wp-admin3.32 ▲0.0149.10 ▼3.17
Posts /wp-admin/edit.php3.37 ▲0.0149.13 ▼1.71
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.21 ▼16.63
Media Library /wp-admin/upload.php3.24 ▲0.0141.25 ▲6.67

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Image Captcha For Gravity Forms: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.381.82 ▲0.0444.24 ▼2.00
Dashboard /wp-admin2,192 ▲125.58 ▲0.0187.39 ▼4.0937.96 ▼6.44
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0134.87 ▼2.4334.82 ▼1.90
Add New Post /wp-admin/post-new.php1,527 ▲123.20 ▲0.06678.07 ▲20.7662.99 ▲5.37
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.07108.15 ▲2.0247.69 ▲2.99

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/image-captcha-for-gravity-forms/image-captcha-gravity-forms.php:15

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: captcha, spam, gravity forms

image-captcha-for-gravity-forms/image-captcha-gravity-forms.php 85% from 13 tests

The main file in "Image Captcha For Gravity Forms" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("image-captcha-for-gravity-forms.php" instead of "image-captcha-gravity-forms.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
No dangerous file extensions were detected316 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PO File46468184
PHP11724123
CSS1039

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions10
▷ Named functions10100.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
No PNG images were found in this plugin