68% sr-scrollbar-wp

Code Review | sr-scrollbar-wp

WordPress plugin sr-scrollbar-wp scored68%from 54 tests.

About plugin

  • Plugin page: sr-scrollbar-wp
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Oct 21, 2014
  • Latest release: Oct 27, 2014
  • Number of updates: 25
  • Update frequency: every 0.4 days
  • Top authors: sohel razzaque (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,298 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.96MB] [CPU: ▼55.78ms] Passed 4 tests

A check of server-side resources used by sr-scrollbar-wp
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.74 ▼39.17
Dashboard /wp-admin2.05 ▼1.265.17 ▼43.72
Posts /wp-admin/edit.php2.05 ▼1.316.03 ▼35.91
Add New Post /wp-admin/post-new.php2.05 ▼3.845.57 ▼104.31
Media Library /wp-admin/upload.php2.05 ▼1.185.93 ▼29.29
scroll_bar_setting_manu /wp-admin/options-general.php?page=scroll_bar-option-page2.055.00

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for sr-scrollbar-wp
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲12613.56 ▼0.798.96 ▲6.9444.09 ▼0.37
Dashboard /wp-admin2,203 ▲265.64 ▼0.0384.03 ▼1.6839.13 ▲2.45
Posts /wp-admin/edit.php2,111 ▲112.04 ▲0.0534.90 ▼4.9732.41 ▼3.07
Add New Post /wp-admin/post-new.php1,542 ▲1618.00 ▼5.13625.97 ▲13.7281.28 ▲23.22
Media Library /wp-admin/upload.php1,408 ▲114.25 ▲0.10107.61 ▲14.7247.71 ▲8.14
scroll_bar_setting_manu /wp-admin/options-general.php?page=scroll_bar-option-page9441.7127.1128.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > 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 bappi-mCustomScrollbar-jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=scroll_bar-option-page
    • > 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 bappi-mCustomScrollbar-jquery 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=scroll_bar-option-page
    • > 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 bappi-perfect-css 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=scroll_bar-option-page
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sr-scrollbar-wp/sr-scrollbar-wp.php:19

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: scrollbar, bar, manubar, scroll, pagescroll

sr-scrollbar-wp/sr-scrollbar-wp.php 92% from 13 tests

The main PHP script in "sr-scrollbar-wp" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 315 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,762 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS2358114927
JavaScript412677687
PHP111024148

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png24.77KB11.01KB▼ 55.56%
screenshot-2.png71.58KB32.95KB▼ 53.98%
screenshot-1.png59.02KB32.22KB▼ 45.41%