84% wc-captcha

Code Review | WC Captcha

WordPress plugin WC Captcha scored84%from 54 tests.

About plugin

  • Plugin page: wc-captcha
  • Plugin version: 1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: May 19, 2020
  • Latest release: May 21, 2023
  • Number of updates: 33
  • Update frequency: every 33.2 days
  • Top authors: webcource (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

6,000+ active /31,426 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▼4.20ms] Passed 4 tests

A check of server-side resources used by WC Captcha
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2742.39 ▼1.74
Dashboard /wp-admin3.58 ▲0.2756.38 ▲0.54
Posts /wp-admin/edit.php3.69 ▲0.3363.71 ▲19.67
Add New Post /wp-admin/post-new.php6.16 ▲0.2787.54 ▼17.76
Media Library /wp-admin/upload.php3.50 ▲0.2739.94 ▲2.15
WC Captcha /wp-admin/options-general.php?page=wc-captcha3.4734.29

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

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

Browser metrics Passed 4 tests

WC Captcha: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.28 ▼0.451.98 ▲0.3445.15 ▲3.27
Dashboard /wp-admin2,196 ▲165.59 ▼0.0380.66 ▼9.1038.66 ▼3.40
Posts /wp-admin/edit.php2,107 ▲282.03 ▲0.0643.57 ▲4.8538.31 ▲4.03
Add New Post /wp-admin/post-new.php1,531 ▼023.13 ▲0.12688.87 ▲63.1355.21 ▼0.66
Media Library /wp-admin/upload.php1,407 ▲74.23 ▼0.01101.32 ▼2.6043.17 ▼2.14
WC Captcha /wp-admin/options-general.php?page=wc-captcha1,0852.3223.6940.03

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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)
Good news, no errors were detected

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-captcha/includes/integrations/contact-form-7.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: You are using too many tags: 26 tag instead of maximum 10
You can take inspiration from this readme.txt

wc-captcha/wc-captcha.php 92% from 13 tests

The entry point to "WC Captcha" version 1.4 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 212 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,103 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP72402581,033
CSS22235
JavaScript23435

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity39.40
▷ Minimum class complexity5.00
▷ Maximum class complexity146.00
Average method complexity4.84
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods50
▷ Static methods12.00%
▷ Public methods4590.00%
▷ Protected methods00.00%
▷ Private methods510.00%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo-webcource.png11.41KB5.83KB▼ 48.96%