10% wp-color-scrollbar

Code Review | WP Color Scrollbar

WordPress plugin WP Color Scrollbar scored10%from 54 tests.

About plugin

  • Plugin page: wp-color-scrollbar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Apr 12, 2014
  • Latest release: Apr 19, 2014
  • Number of updates: 4
  • Update frequency: every 1.8 days
  • Top authors: babyskill (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /2,739 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/wp-color-scrollbar/inc/color.class.php+47
    Undefined index: page

Server metrics [RAM: ▼1.90MB] [CPU: ▼54.11ms] Passed 4 tests

An overview of server-side resources used by WP Color Scrollbar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.95 ▼34.86
Dashboard /wp-admin2.11 ▼1.207.02 ▼43.15
Posts /wp-admin/edit.php2.11 ▼1.257.21 ▼43.34
Add New Post /wp-admin/post-new.php2.11 ▼3.787.12 ▼95.09
Media Library /wp-admin/upload.php2.11 ▼1.126.24 ▼28.27
WP Color Scrollbar /wp-admin/options-general.php?page=soocolor-settings2.116.39

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

WP Color Scrollbar: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,021 ▲28614.05 ▼0.3513.33 ▲11.6741.80 ▼8.27
Dashboard /wp-admin2,231 ▲405.25 ▼0.63114.86 ▲6.9948.96 ▲3.01
Posts /wp-admin/edit.php2,119 ▲272.34 ▲0.2140.50 ▼0.4335.23 ▼2.59
Add New Post /wp-admin/post-new.php1,533 ▲1923.42 ▲5.94619.34 ▼63.4633.53 ▼17.94
Media Library /wp-admin/upload.php1,416 ▲314.48 ▲0.2896.78 ▼5.8040.82 ▼1.29
WP Color Scrollbar /wp-admin/options-general.php?page=soocolor-settings1,0882.5640.7933.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the soo-color-scrollbar handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=soocolor-settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the soo-color-scrollbar handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=soocolor-settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the soo-colorscrollbar-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-color-scrollbar/WP-Color-Scrollbar.php:11
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-color-scrollbar/WP-Color-Scrollbar.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: jquery scrollbar, color, nice scrollbar, custom scrollbar, scrollbar...

wp-color-scrollbar/WP-Color-Scrollbar.php 85% from 13 tests

"WP Color Scrollbar" version 1.0'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:
  • Description: Keep the plugin description shorter than 140 characters (currently 176 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-color-scrollbar.php" instead of "WP-Color-Scrollbar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin346 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP23612182
JavaScript200117
CSS12947

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png39.10KB17.98KB▼ 54.02%
assets/banner-772x250.png75.76KB27.26KB▼ 64.02%
assets/screenshot-2.png42.87KB19.33KB▼ 54.92%
img/color-bg.png13.08KB3.89KB▼ 70.23%