10% captcha-solution

Code Review | CAPTCHA Solution

WordPress plugin CAPTCHA Solution scored10%from 54 tests.

About plugin

  • Plugin page: captcha-solution
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0
  • WordPress version: 6.3.1
  • First release: Oct 10, 2018
  • Latest release: Dec 10, 2018
  • Number of updates: 16
  • Update frequency: every 3.9 days
  • Top authors: essitco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,240 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/captcha-solution/captcha-solution.php+130
    Methods with the same name as their class will not be constructors in a future version of PHP; ESSITCO_Admin has a deprecated constructor

Server metrics [RAM: ▼1.89MB] [CPU: ▼50.91ms] Passed 4 tests

An overview of server-side resources used by CAPTCHA Solution
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.374.78 ▼32.71
Dashboard /wp-admin2.12 ▼1.195.98 ▼39.39
Posts /wp-admin/edit.php2.12 ▼1.245.61 ▼40.77
Add New Post /wp-admin/post-new.php2.12 ▼3.776.44 ▼90.78
Media Library /wp-admin/upload.php2.12 ▼1.115.83 ▼27.52
Captcha Solution /wp-admin/options-general.php?page=essitco_captcha_solution2.126.28

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
ESSITCO_esscaptcha_solution_status
widget_recent-posts
ESSITCO_captcha_solution_attempts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for CAPTCHA Solution
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.34 ▼0.001.93 ▲0.3843.72 ▲1.09
Dashboard /wp-admin2,199 ▲195.63 ▲0.0183.15 ▼13.0138.75 ▼7.39
Posts /wp-admin/edit.php2,101 ▲11.94 ▼0.0735.28 ▼1.8032.34 ▼2.96
Add New Post /wp-admin/post-new.php1,544 ▲1823.25 ▼0.35658.45 ▲3.6449.93 ▼3.09
Media Library /wp-admin/upload.php1,404 ▲44.22 ▼0.0493.34 ▼4.9439.55 ▼7.62
Captcha Solution /wp-admin/options-general.php?page=essitco_captcha_solution8192.0223.6627.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/captcha-solution/captcha-solution.php+130
    Methods with the same name as their class will not be constructors in a future version of PHP; ESSITCO_Admin has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=essitco_captcha_solution
    • > Deprecated in wp-content/plugins/captcha-solution/captcha-solution.php+130
    Methods with the same name as their class will not be constructors in a future version of PHP; ESSITCO_Admin has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=essitco_captcha_solution
    • > Notice in wp-content/plugins/captcha-solution/admin/settings.php+5
    Undefined index: tab

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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/captcha-solution/admin/settings.php
    • > /wp-content/plugins/captcha-solution/admin/inc/features.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/captcha-solution/captcha-solution.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/captcha-solution/admin/inc/settings.php:3

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

captcha-solution/captcha-solution.php Passed 13 tests

The main PHP script in "CAPTCHA Solution" version 1.0 is automatically included on every request by WordPress
89 characters long description:
Captcha Solution is a 100% effective CAPTCHA for WordPress that integrates Contact Form 7

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected276 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43012276

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity4.50
▷ Minimum method complexity2.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected