83% ws-custom-scrollbar

Code Review | WS Custom Scrollbar

WordPress plugin WS Custom Scrollbar scored83%from 54 tests.

About plugin

  • Plugin page: ws-custom-scrollbar
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Oct 22, 2015
  • Latest release: Jun 1, 2017
  • Number of updates: 89
  • Update frequency: every 6.6 days
  • Top authors: webshouter (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /9,137 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.87ms] Passed 4 tests

A check of server-side resources used by WS Custom Scrollbar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.39 ▲0.88
Dashboard /wp-admin3.35 ▲0.0548.17 ▲0.94
Posts /wp-admin/edit.php3.40 ▲0.0444.70 ▼7.97
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.29 ▼17.34
Media Library /wp-admin/upload.php3.27 ▲0.0434.17 ▲1.44
WS Custom Scrollbar /wp-admin/options-general.php?page=ws-custom-scrollbar3.2431.05

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 15 new options
New WordPress options
ws_custom_scrollbar_bgcolor
ws_custom_scrollbar_width
db_upgraded
ws_custom_scrollbar_autohide
ws_custom_scrollbar_speed
ws_custom_scrollbar_show
ws_custom_scrollbar_hidecursordelay
ws_custom_scrollbar_opacity
widget_recent-posts
ws_custom_scrollbar_border_color
...

Browser metrics Passed 4 tests

WS Custom Scrollbar: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,023 ▲27713.92 ▼0.4515.98 ▲14.3144.92 ▲2.02
Dashboard /wp-admin2,229 ▲415.12 ▼0.76104.11 ▲3.2839.24 ▼8.27
Posts /wp-admin/edit.php2,114 ▲252.32 ▲0.3035.07 ▼5.4231.00 ▼7.52
Add New Post /wp-admin/post-new.php1,531 ▼523.26 ▼0.02606.07 ▼45.4632.62 ▼20.49
Media Library /wp-admin/upload.php1,411 ▲234.47 ▲0.2595.04 ▼2.6739.96 ▼3.15
WS Custom Scrollbar /wp-admin/options-general.php?page=ws-custom-scrollbar1,2352.3347.2537.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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 | 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ws-custom-scrollbar/ws-custom-scrollbar.php:203

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 22 tag instead of maximum 10
Please take inspiration from this readme.txt

ws-custom-scrollbar/ws-custom-scrollbar.php 85% from 13 tests

"WS Custom Scrollbar" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 165 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin2,801 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript35451052,620
PHP21316181

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin