72% keycaptcha

Code Review | KeyCAPTCHA - Social WordPress CAPTCHA

WordPress plugin KeyCAPTCHA - Social WordPress CAPTCHA scored72%from 54 tests.

About plugin

  • Plugin page: keycaptcha
  • Plugin version: 2.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.9.2
  • WordPress version: 6.3.1
  • First release: Nov 5, 2010
  • Latest release: Aug 26, 2014
  • Number of updates: 159
  • Update frequency: every 8.7 days
  • Top authors: KeyCAPTCHA (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /37,962 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.24ms] Passed 4 tests

Server-side resources used by KeyCAPTCHA - Social WordPress CAPTCHA
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1140.71 ▲3.05
Dashboard /wp-admin3.40 ▲0.1051.46 ▲2.95
Posts /wp-admin/edit.php3.51 ▲0.1646.09 ▲0.38
Add New Post /wp-admin/post-new.php5.98 ▲0.1092.54 ▼13.16
Media Library /wp-admin/upload.php3.32 ▲0.1034.88 ▼3.13
KeyCAPTCHA /wp-admin/plugins.php?page=keycaptcha/keycaptcha.php3.3330.29

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
keycaptcha_vars_db
widget_recent-comments

Browser metrics Passed 4 tests

KeyCAPTCHA - Social WordPress CAPTCHA: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.26 ▼1.192.10 ▼0.0543.14 ▼4.50
Dashboard /wp-admin2,213 ▲225.88 ▼0.0294.14 ▼13.9338.33 ▼1.35
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0440.90 ▲4.1134.40 ▲2.81
Add New Post /wp-admin/post-new.php1,545 ▲3118.50 ▼4.91595.99 ▼70.0453.63 ▼11.13
Media Library /wp-admin/upload.php1,389 ▲44.11 ▼0.1399.76 ▼3.6943.23 ▼1.46
KeyCAPTCHA /wp-admin/plugins.php?page=keycaptcha/keycaptcha.php9912.1740.4138.81

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/plugins.php?page=keycaptcha/keycaptcha.php
    • > Notice in wp-content/plugins/keycaptcha/keycaptcha_settings.php+150
    Undefined index: keycaptcha_custom_text

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/keycaptcha/kc-gettime.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/keycaptcha/keycaptcha.php:201
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/keycaptcha/keycaptcha.php on line 195
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/keycaptcha/keycaptcha_settings.php:61

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Our CAPTCHA on comments), #2 (Our CAPTCHA on registration form), #3 (Our CAPTCHA on Contact Form 7), #4 (Our CAPTCHA on login form), #5 (Our CAPTCHA on lost password form), #6 (Page with our CAPTCHA settings)
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

keycaptcha/keycaptcha.php Passed 13 tests

"KeyCAPTCHA - Social WordPress CAPTCHA" version 2.5.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
90 characters long description:
Adds KeyCAPTCHA anti-spam solution to WordPress on the comment form and registration form.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin734 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP48097621
PO File12344113

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity31.50
▷ Minimum class complexity15.00
▷ Maximum class complexity48.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2395.83%
▷ Protected methods00.00%
▷ Private methods14.17%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin