10% gf-basic-captcha

Code Review | GF Basic Captcha

WordPress plugin GF Basic Captcha scored10%from 54 tests.

About plugin

  • Plugin page: gf-basic-captcha
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 12, 2018
  • Latest release: Aug 12, 2018
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: martinellimarco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /545 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Error in wp-content/plugins/gf-basic-captcha/gf-basic-captcha.php+12
    Uncaught Error: Class 'GF_Field' not found in wp-content/plugins/gf-basic-captcha/gf-basic-captcha.php:12
    Stack trace:
    #0 wp-admin/includes/plugin.php(2318): include_once()
    #1 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

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

Server-side resources used by GF Basic Captcha
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.75 ▼0.45
Dashboard /wp-admin3.31 ▼0.0449.01 ▼12.62
Posts /wp-admin/edit.php3.36 ▲0.0049.01 ▼4.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.67 ▼13.60
Media Library /wp-admin/upload.php3.23 ▲0.0033.10 ▼3.62

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for GF Basic Captcha
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.74 ▲0.451.79 ▼0.0443.35 ▼1.17
Dashboard /wp-admin2,224 ▲185.86 ▲0.04105.82 ▲0.2444.43 ▲4.80
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0033.61 ▼4.4634.94 ▲0.12
Add New Post /wp-admin/post-new.php1,540 ▲923.37 ▼0.13615.76 ▼89.7357.52 ▼3.72
Media Library /wp-admin/upload.php1,403 ▲64.30 ▲0.10103.97 ▼7.0944.96 ▼2.34

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'GF_Field' not found in wp-content/plugins/gf-basic-captcha/gf-basic-captcha.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: gravity form, gravity forms, captcha

gf-basic-captcha/gf-basic-captcha.php Passed 13 tests

Analyzing the main PHP file in "GF Basic Captcha" version 1.0
48 characters long description:
A very simple captcha solution for Gravity Forms

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected101 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP123989
Markdown17012

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin