84% captcha-code-authentication

Code Review | Captcha Code

WordPress plugin Captcha Code scored84%from 54 tests.

About plugin

  • Plugin page: captcha-code-auth...
  • Plugin version: 2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Jul 17, 2012
  • Latest release: Nov 4, 2022
  • Number of updates: 128
  • Update frequency: every 29.4 days
  • Top authors: vinoj.cardoza (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

30,000+ active /346,883 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼9.21ms] Passed 4 tests

Analyzing server-side resources used by Captcha Code
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.29 ▼0.75
Dashboard /wp-admin3.39 ▲0.0446.40 ▼14.32
Posts /wp-admin/edit.php3.44 ▲0.0846.63 ▼2.85
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.83 ▼18.91
Media Library /wp-admin/upload.php3.31 ▲0.0834.98 ▲3.12
Captcha Settings /wp-admin/options-general.php?page=wp_captcha_slug3.2832.07

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
wpcaptcha_status
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Captcha Code
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.47 ▲0.111.81 ▲0.1340.70 ▼4.74
Dashboard /wp-admin2,207 ▲194.85 ▼1.04103.73 ▼10.6839.02 ▼7.22
Posts /wp-admin/edit.php2,093 ▲42.03 ▼0.0035.79 ▼1.8430.92 ▼2.68
Add New Post /wp-admin/post-new.php1,517 ▼1417.46 ▼5.79611.71 ▼22.3261.81 ▼0.23
Media Library /wp-admin/upload.php1,395 ▲74.21 ▼0.01130.05 ▲29.9346.01 ▼2.18
Captcha Settings /wp-admin/options-general.php?page=wp_captcha_slug1,0162.0323.1927.52

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • wpcaptcha_status

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/captcha-code-authentication/wpCaptcha.php:14

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 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
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png), #4 (screenshot-4.png)
You can take inspiration from this readme.txt

captcha-code-authentication/wpCaptcha.php 92% from 13 tests

The main PHP script in "Captcha Code" version 2.8 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("captcha-code-authentication.php" instead of "wpCaptcha.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
Success! There were no dangerous files found in this plugin1,653 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PO File164725991,204
PHP26957449

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.40MB with 0.34MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png86.11KB7.82KB▼ 90.91%
screenshot-4.png93.91KB9.04KB▼ 90.37%
screenshot-2.png84.99KB7.80KB▼ 90.82%
screenshot-1.png140.68KB41.59KB▼ 70.44%