94% slidecaptcha

Code Review | Slide Captcha

WordPress plugin Slide Captcha scored 94% from 54 tests.

About plugin

  • Plugin page: slidecaptcha
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7
  • WordPress version: 5.8.1
  • First release: Jun 24, 2017
  • Latest release: Jun 24, 2017
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: kudesnic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 534 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼146.54ms] Passed 4 tests

An overview of server-side resources used by Slide Captcha
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0336.95 ▼2.53
Dashboard /wp-admin3.09 ▲0.0350.19 ▲2.34
Posts /wp-admin/edit.php3.14 ▲0.0346.84 ▲0.63
Add New Post /wp-admin/post-new.php5.45 ▲0.0193.87 ▼582.30
Media Library /wp-admin/upload.php3.03 ▲0.0332.69 ▼1.96
Captcha /wp-admin/options-general.php?page=scap_sCaptcha_menu3.0237.48

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Slide Captcha: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲13615.90 ▲0.449.27 ▲1.9548.86 ▼1.79
Dashboard /wp-admin2,972 ▲385.88 ▼0.31149.32 ▼8.78123.18 ▲3.49
Posts /wp-admin/edit.php2,744 ▲52.69 ▼0.0169.53 ▲3.0583.37 ▼12.65
Add New Post /wp-admin/post-new.php1,686 ▲318.81 ▲0.79381.85 ▲6.51122.59 ▲5.46
Media Library /wp-admin/upload.php1,809 ▲25.01 ▼0.01153.43 ▼11.82137.23 ▲12.27
Captcha /wp-admin/options-general.php?page=scap_sCaptcha_menu1,3723.6395.5774.60

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/slidecaptcha/slideCaptcha.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: slide captcha, slider, anti-spam, captcha, jquery...

slidecaptcha/slideCaptcha.php 85% from 13 tests

Analyzing the main PHP file in "Slide Captcha" version 1.0
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 ("slidecaptcha.php" instead of "slideCaptcha.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected253 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP1239112
CSS1150111
JavaScript341630

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.24MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/slide-bg.png14.46KB5.79KB▼ 60.00%
images/tumblr_static_bg3.png233.71KB123.17KB▼ 47.30%