78% slider-captcha

Code Review | Slider CAPTCHA

WordPress plugin Slider CAPTCHA scored78%from 54 tests.

About plugin

  • Plugin page: slider-captcha
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0
  • WordPress version: 6.3.1
  • First release: Apr 8, 2014
  • Latest release: Sep 4, 2014
  • Number of updates: 41
  • Update frequency: every 3.6 days
  • Top authors: vaurdan (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

100+ active /8,725 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.83ms] Passed 4 tests

An overview of server-side resources used by Slider CAPTCHA
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1341.01 ▼0.67
Dashboard /wp-admin3.43 ▲0.0849.53 ▼14.99
Posts /wp-admin/edit.php3.54 ▲0.1949.16 ▲3.69
Add New Post /wp-admin/post-new.php6.03 ▲0.1489.97 ▼3.34
Media Library /wp-admin/upload.php3.35 ▲0.1238.20 ▲4.83
Slider CAPTCHA /wp-admin/options-general.php?page=slider-captcha-settings3.2930.54

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
slider_captcha_last_version
slider-captcha-sliders
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Slider CAPTCHA
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲21113.75 ▼0.647.63 ▲5.7042.98 ▲1.09
Dashboard /wp-admin2,261 ▲735.03 ▲0.17113.55 ▲7.0338.84 ▼7.24
Posts /wp-admin/edit.php2,145 ▲562.25 ▲0.2437.80 ▲2.2135.73 ▼1.95
Add New Post /wp-admin/post-new.php1,533 ▼023.37 ▲0.20651.58 ▼27.3560.06 ▲6.15
Media Library /wp-admin/upload.php1,463 ▲754.27 ▲0.0697.88 ▲1.7544.48 ▲0.16
Slider CAPTCHA /wp-admin/options-general.php?page=slider-captcha-settings23,3574.22270.3559.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • theysaidso_admin_options
    • slider_captcha_last_version
    • db_upgraded
    • widget_theysaidso_widget
    • slider-captcha-sliders
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=slider-captcha-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=slider-captcha-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=slider-captcha-settings
    • > Notice in wp-content/plugins/slider-captcha/views/slider-captcha-admin.php+139
    Undefined variable: i
  • 26 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=slider-captcha-settings
    • > Notice in wp-content/plugins/slider-captcha/views/slider-captcha-admin.php+161
    Undefined index: type
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=slider-captcha-settings
    • > Notice in wp-content/plugins/slider-captcha/views/slider-captcha-admin.php+163
    Undefined index: textFeedbackAnimation
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=slider-captcha-settings
    • > Notice in wp-content/plugins/slider-captcha/views/slider-captcha-admin.php+175
    Undefined index: width
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=slider-captcha-settings
    • > Notice in wp-content/plugins/slider-captcha/views/slider-captcha-admin.php+178
    Undefined index: height
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=slider-captcha-settings
    • > Notice in wp-content/plugins/slider-captcha/views/slider-captcha-admin.php+184
    Undefined index: hintText
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=slider-captcha-settings
    • > Notice in wp-content/plugins/slider-captcha/views/slider-captcha-admin.php+188
    Undefined index: hintTextAfterUnlock
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=slider-captcha-settings
    • > Notice in wp-content/plugins/slider-captcha/views/slider-captcha-admin.php+269
    Undefined index: styles
  • 3486 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=slider-captcha-settings
    • > Notice in wp-content/plugins/slider-captcha/views/slider-captcha-admin.php+269
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=slider-captcha-settings
    • > Notice in wp-content/plugins/slider-captcha/views/slider-captcha-admin.php+200
    Undefined index: hintTextSize
  • 1152 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=slider-captcha-settings
    • > Notice in wp-content/plugins/slider-captcha/views/slider-captcha-admin.php+264
    Undefined index: face
  • 2356 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=slider-captcha-settings
    • > Notice in wp-content/plugins/slider-captcha/views/slider-captcha-admin.php+269
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/slider-captcha/slider-captcha.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'sliderCaptchaModule' not found in wp-content/plugins/slider-captcha/modules/shortcode.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'sliderCaptchaModule' not found in wp-content/plugins/slider-captcha/modules/mailpress.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'sliderCaptchaModule' not found in wp-content/plugins/slider-captcha/modules/contact-form-7.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/slider-captcha/views/slider-captcha-admin.php:118
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/slider-captcha/font_face_options.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: There are too many tags (18 tag instead of maximum 10)
You can look at the official readme.txt

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

"Slider CAPTCHA" version 1.4.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

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
There were no executable files found in this plugin5,965 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript97118462,704
CSS34083061,305
PHP82061291,218
SVG100295
PO File16067172
Sass2322122
Bourne Shell119053
Markdown122052
JSON20044

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity13.00
▷ Minimum class complexity2.00
▷ Maximum class complexity47.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods53
▷ Static methods00.00%
▷ Public methods5298.11%
▷ Protected methods00.00%
▷ Private methods11.89%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/select2/select2x2.png0.83KB0.77KB▼ 6.15%
js/select2/select2.png0.60KB0.99KB0.00%