10% guroot-captcha

Code Review | Guroot Captcha

WordPress plugin Guroot Captcha scored 10% from 54 tests.

About plugin

  • Plugin page: guroot-captcha
  • Plugin version: 0.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.3-5.2.3
  • WordPress version: 5.8.1
  • First release: Apr 1, 2013
  • Latest release: Oct 4, 2019
  • Number of updates: 21
  • Update frequency: every 114.1 days
  • Top authors: Jonathan Fleury (90.48%)jonathanfleury (14.29%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 812 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/guroot-captcha/guroot_captcha.php+13
    Constant WP_DEBUG already defined

Server metrics [RAM: ▼1.86MB] [CPU: ▼189.03ms] Passed 4 tests

Server-side resources used by Guroot Captcha
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.77 ▼0.956.11 ▼14.65
Dashboard /wp-admin1.79 ▼1.276.82 ▼38.31
Posts /wp-admin/edit.php1.79 ▼1.326.06 ▼40.17
Add New Post /wp-admin/post-new.php1.79 ▼3.655.94 ▼654.39
Media Library /wp-admin/upload.php1.79 ▼1.225.87 ▼23.23

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: 2 new tables, no new options
New tables
wp_GURCAPTCHA_Images
wp_GURCAPTCHA_Session

Browser metrics Passed 4 tests

This is an overview of browser requirements for Guroot Captcha
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,825 ▲22916.27 ▲0.6313.46 ▲4.5752.26 ▼4.19
Dashboard /wp-admin2,967 ▲365.89 ▼0.09156.78 ▼10.44115.48 ▲3.97
Posts /wp-admin/edit.php2,745 ▲62.73 ▲0.0170.74 ▲0.8689.53 ▲10.64
Add New Post /wp-admin/post-new.php1,683 ▲7918.32 ▼0.44435.28 ▲22.30116.78 ▲7.12
Media Library /wp-admin/upload.php1,807 ▼35.02 ▼0.02165.96 ▲8.88124.44 ▲12.96

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/guroot-captcha/guroot_captcha.php+13
    Constant WP_DEBUG already defined

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/guroot-captcha/guroot_captcha.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/guroot-captcha/GURCAPTCHA_template.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

guroot-captcha/guroot_captcha.php 92% from 13 tests

The principal PHP file in "Guroot Captcha" v. 0.2.4 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("guroot-captcha.php" instead of "guroot_captcha.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin296 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP87782296

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.25
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods311.11%
▷ Public methods1866.67%
▷ Protected methods00.00%
▷ Private methods933.33%
Functions7
▷ Named functions571.43%
▷ Anonymous functions228.57%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png59.45KB27.76KB▼ 53.31%