78% better-scrollbar

Code Review | WP Scrollbar

WordPress plugin WP Scrollbar scored78%from 54 tests.

About plugin

  • Plugin page: better-scrollbar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-1.0
  • WordPress version: 6.3.1
  • First release: Feb 12, 2015
  • Latest release: Dec 12, 2016
  • Number of updates: 13
  • Update frequency: every 51.5 days
  • Top authors: Sohelwpexpert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /855 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
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.64ms] Passed 4 tests

A check of server-side resources used by WP Scrollbar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0833.03 ▼9.86
Dashboard /wp-admin3.32 ▲0.0147.52 ▼2.46
Posts /wp-admin/edit.php3.37 ▲0.0151.10 ▲0.13
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.20 ▼9.73
Media Library /wp-admin/upload.php3.24 ▲0.0134.52 ▼4.49
Scroll Bar Options /wp-admin/options-general.php?page=automaticpageload-settings3.1834.18

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Scrollbar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,050 ▲30413.97 ▼0.3614.01 ▲12.0941.07 ▼6.94
Dashboard /wp-admin2,232 ▲445.06 ▲0.17103.91 ▼4.2043.30 ▲0.47
Posts /wp-admin/edit.php2,111 ▲222.29 ▲0.2835.70 ▲0.3631.56 ▼3.69
Add New Post /wp-admin/post-new.php1,531 ▲1723.39 ▲5.93681.65 ▼23.8541.31 ▼26.45
Media Library /wp-admin/upload.php1,411 ▲234.45 ▲0.24102.97 ▼6.6943.70 ▲0.21
Scroll Bar Options /wp-admin/options-general.php?page=automaticpageload-settings1,1752.2351.5825.84

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=automaticpageload-settings
    • > Notice in wp-content/plugins/better-scrollbar/nicescroll.min.php+184
    Undefined index: cursor_border_radius

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
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 add_action() in wp-content/plugins/better-scrollbar/nicescroll.min.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Donate link: Invalid URI found ("")
  • Screenshots: These screenshots do not have images: #1 (jest install WP Scrollbar plugin), #2 (Another demo.)
You can take inspiration from this readme.txt

better-scrollbar/nicescroll.min.php 92% from 13 tests

The main file in "WP Scrollbar" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("better-scrollbar.php" instead of "nicescroll.min.php")

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
There were no executable files found in this plugin302 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16822162
JavaScript220140

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected