73% scrollbar-customizer

Code Review | Scrollbar Customizer

WordPress plugin Scrollbar Customizer scored73%from 54 tests.

About plugin

  • Plugin page: scrollbar-customizer
  • Plugin version: 1.5.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Apr 27, 2022
  • Latest release: Jul 7, 2023
  • Number of updates: 20
  • Update frequency: every 21.8 days
  • Top authors: wpmighty (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,182 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.43MB] [CPU: ▲23.62ms] 50% from 4 tests

Server-side resources used by Scrollbar Customizer
Please have a look at the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,955.26ms on /wp-admin/themes.php?page=wp_customscrollbar_settings)
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.43MB on /wp-admin/themes.php?page=wp_customscrollbar_settings)
PageMemory (MB)CPU Time (ms)
Home /9.21 ▲5.7468.34 ▲30.54
Dashboard /wp-admin9.23 ▲5.8871.14 ▲7.64
Posts /wp-admin/edit.php9.23 ▲5.8771.36 ▲22.55
Add New Post /wp-admin/post-new.php10.13 ▲4.24129.73 ▲33.74
Media Library /wp-admin/upload.php9.23 ▲5.9974.97 ▲41.18
Freemius Debug [v.2.5.9] /wp-admin/admin.php?page=freemius9.2357.96
Scrollbar Customizer /wp-admin/themes.php?page=wp_customscrollbar_settings9.231,955.26

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 217 new files
Database: no new tables, 9 new options
New WordPress options
fs_accounts
can_compress_scripts
widget_recent-comments
widget_recent-posts
fs_active_plugins
fs_debug_mode
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Scrollbar Customizer: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲8413.63 ▼0.7217.69 ▲15.9227.39 ▼13.53
Dashboard /wp-admin2,219 ▲395.62 ▲0.0493.53 ▲5.0839.18 ▼1.71
Posts /wp-admin/edit.php2,125 ▲252.02 ▲0.0335.92 ▼0.9235.77 ▲1.88
Add New Post /wp-admin/post-new.php1,543 ▲924.54 ▲1.41651.22 ▲6.0671.15 ▲15.89
Media Library /wp-admin/upload.php1,424 ▲274.23 ▲0.0297.26 ▼3.9245.86 ▲0.98
Freemius Debug [v.2.5.9] /wp-admin/admin.php?page=freemius1,0891.6925.6429.45
Scrollbar Customizer /wp-admin/themes.php?page=wp_customscrollbar_settings1,0363.5870.0362.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/scrollbar-customizer/libraries/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 9 options in the database
    • theysaidso_admin_options
    • fs_accounts
    • db_upgraded
    • widget_recent-comments
    • fs_active_plugins
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • fs_debug_mode

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/scrollbar-customizer/libraries/vendor/mobiledetect/mobiledetectlib/export/exportToJSON.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: The official readme.txt might help

scrollbar-customizer/scrollbar-customizer.php 92% from 13 tests

The main PHP script in "Scrollbar Customizer" version 1.5.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 150 characters long)

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected37,427 lines of code in 167 files:
LanguageFilesBlank linesComment linesLines of code
PHP1358,67618,68835,327
JavaScript5230621,457
Markdown51430329
JSON400161
PO File13845103
XML10020
CSS150015
YAML11015

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,079)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity82.10
▷ Minimum class complexity1.00
▷ Maximum class complexity3,079.00
Average method complexity4.42
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes47.02%
Methods1,426
▷ Static methods23216.27%
▷ Public methods1,02972.16%
▷ Protected methods221.54%
▷ Private methods37526.30%
Functions96
▷ Named functions9497.92%
▷ Anonymous functions22.08%
Constants157
▷ Global constants10164.33%
▷ Class constants5635.67%
▷ Public constants56100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libraries/vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
libraries/vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%