84% scrollbar-designer

Code Review | Scrollbar Designer

WordPress plugin Scrollbar Designer scored84%from 54 tests.

About plugin

  • Plugin page: scrollbar-designer
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Jul 25, 2015
  • Latest release: Oct 27, 2015
  • Number of updates: 133
  • Update frequency: every 0.7 days
  • Top authors: Zia Imtiaz (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /12,592 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.95ms] Passed 4 tests

An overview of server-side resources used by Scrollbar Designer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0748.30 ▲5.66
Dashboard /wp-admin3.39 ▲0.0852.01 ▼2.02
Posts /wp-admin/edit.php3.44 ▲0.0853.80 ▲5.03
Add New Post /wp-admin/post-new.php5.99 ▲0.1089.59 ▼20.55
Media Library /wp-admin/upload.php3.31 ▲0.0839.88 ▲1.75

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 14 new options
New WordPress options
can_compress_scripts
st_mouse_switch
widget_theysaidso_widget
st_sb_width
st_sb_color
st_sb_border_style
st_rail_color_opacity
widget_recent-posts
st_sb_border_size
st_sb_border_color
...

Browser metrics Passed 4 tests

Checking browser requirements for Scrollbar Designer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲14013.53 ▼0.889.29 ▲7.2342.02 ▼3.09
Dashboard /wp-admin2,226 ▲525.80 ▲0.2493.94 ▲2.1739.39 ▼0.33
Posts /wp-admin/edit.php2,136 ▲362.27 ▲0.3039.37 ▲0.6134.51 ▼1.88
Add New Post /wp-admin/post-new.php1,550 ▲1923.85 ▲0.81670.41 ▼7.5935.82 ▼21.40
Media Library /wp-admin/upload.php1,434 ▲344.43 ▲0.20102.19 ▲3.0541.42 ▼5.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/scrollbar-designer/scrollbar-designer.php:68
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/scrollbar-designer/scrollbar-action.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/scrollbar-designer/scrollbar-designer-settings-page.php:3

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 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Please delete some tags, you are using 52 tag instead of maximum 10
The official readme.txt might help

scrollbar-designer/scrollbar-designer.php Passed 13 tests

The main file in "Scrollbar Designer" v. 2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
116 characters long description:
Scrollbar Designer allows you to customize the appearance of default scrollbar on your website matching your theme .

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin3,189 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript35451052,620
PHP313613569

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.02
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/lps.png9.97KB4.98KB▼ 50.07%