67% captcha-garb

Code Review | Captcha Garb

WordPress plugin Captcha Garb scored67%from 54 tests.

About plugin

  • Plugin page: captcha-garb
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.5
  • WordPress version: 6.3.1
  • First release: May 22, 2012
  • Latest release: Jan 25, 2013
  • Number of updates: 16
  • Update frequency: every 15.5 days
  • Top authors: sorcererayush (75%)webgarb (31.25%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /3,403 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.89MB] [CPU: ▼31.34ms] Passed 4 tests

An overview of server-side resources used by Captcha Garb
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0638.48 ▼8.31
Dashboard /wp-admin3.09 ▼0.2525.32 ▼26.43
Posts /wp-admin/edit.php3.09 ▼0.3128.63 ▼20.28
Add New Post /wp-admin/post-new.php3.09 ▼2.8425.34 ▼70.35
Media Library /wp-admin/upload.php3.09 ▼0.1831.24 ▼6.10
Captcha Garb /wp-admin/options-general.php?page=captcha-garb/captcha-garb_admin.php3.0929.79

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 71 new files
Database: no new tables, 9 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Captcha Garb
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲11113.33 ▼1.237.66 ▲5.9739.34 ▼4.89
Dashboard /wp-admin2,199 ▲345.61 ▲0.0382.92 ▼10.1039.54 ▼5.10
Posts /wp-admin/edit.php2,101 ▲12.00 ▼0.0239.00 ▲1.8936.25 ▼1.40
Add New Post /wp-admin/post-new.php1,540 ▲1218.18 ▼4.58630.97 ▼87.0167.39 ▲8.55
Media Library /wp-admin/upload.php1,401 ▲14.23 ▲0.04105.76 ▼8.7640.61 ▼8.87
Captcha Garb /wp-admin/options-general.php?page=captcha-garb/captcha-garb_admin.php1,8483.9579.49118.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 9 options
    • captcha_garb_install
    • db_upgraded
    • cgarb_enable
    • can_compress_scripts
    • widget_recent-posts
    • cgarb_css
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=captcha-garb/captcha-garb_admin.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=captcha-garb/captcha-garb_admin.php
    • > Network (severe)
    http://widgets.twimg.com/j/2/widget.js - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/options-general.php?page=captcha-garb/captcha-garb_admin.php
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=captcha-garb%2Fcaptcha-garb_admin.php 537:0 Uncaught ReferenceError: TWTR is not defined


Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === captcha-garb === )
  • Screenshots: These screenshots require images: #1 (Captcha Garb puzzle captcha on comment form), #2 (Captcha Garb adminpanel.), #3 (Captcha Garb adminpanel manage puzzle's,)
The official readme.txt might help

captcha-garb/captchagarb.php 92% from 13 tests

This is the main PHP file of "Captcha Garb" version 1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("captcha-garb.php" instead of "captchagarb.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 detected520 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions14100.00%
▷ Anonymous functions00.00%
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.77MB with 0.68MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
logo.png7.19KB4.27KB▼ 40.64%
(invalid) puzzle/puzz_16.png14.21KB0.00KB▼ 100.00%
(invalid) puzzle/puzz_8.png6.12KB0.00KB▼ 100.00%
(invalid) puzzle/puzz_7.png15.96KB0.00KB▼ 100.00%
(invalid) puzzle/puzz_12.png5.01KB0.00KB▼ 100.00%