67% scrollbar-supper

Code Review | Scrollbar Supper

WordPress plugin Scrollbar Supper scored67%from 54 tests.

About plugin

  • Plugin page: scrollbar-supper
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Apr 3, 2015
  • Latest release: Apr 3, 2015
  • Number of updates: 8
  • Update frequency: every 1.4 days
  • Top authors: WorldMarkerter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▼1.97MB] [CPU: ▼61.21ms] Passed 4 tests

An overview of server-side resources used by Scrollbar Supper
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.87 ▼36.46
Dashboard /wp-admin2.05 ▼1.306.21 ▼63.50
Posts /wp-admin/edit.php2.05 ▼1.314.91 ▼46.68
Add New Post /wp-admin/post-new.php2.05 ▼3.845.03 ▼98.18
Media Library /wp-admin/upload.php2.05 ▼1.184.81 ▼33.81
Scrollbar Supper Options /wp-admin/options-general.php?page=WM-scrollbar-settings2.055.27

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Scrollbar Supper
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,043 ▲29714.01 ▼0.3717.20 ▲15.2447.73 ▲5.10
Dashboard /wp-admin2,222 ▲455.87 ▲0.33103.67 ▲1.1441.92 ▲1.55
Posts /wp-admin/edit.php2,108 ▲82.33 ▲0.3435.35 ▼0.2933.44 ▼1.32
Add New Post /wp-admin/post-new.php1,560 ▲3423.15 ▼0.38666.11 ▼16.6737.39 ▼17.06
Media Library /wp-admin/upload.php1,434 ▲344.49 ▲0.1986.17 ▼21.3341.21 ▼6.03
Scrollbar Supper Options /wp-admin/options-general.php?page=WM-scrollbar-settings1,0432.5240.7826.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following 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 WM_scrollbar_color_picker_js 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
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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=WM-scrollbar-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 WM_scrollbar_color_picker_js 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=WM-scrollbar-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 WM_scrollbar_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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/scrollbar-supper/plugins-functions.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
  • Contributors: The plugin contributors field is missing
  • Screenshots: Please describe screenshot #2 in scrollbar-supper/assets to your readme.txt
Please take inspiration from this readme.txt

scrollbar-supper/plugins-functions.php 85% from 13 tests

The main PHP file in "Scrollbar Supper" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 309 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("scrollbar-supper.php" instead of "plugins-functions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected321 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32413187
PHP12814134

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png24.61KB8.23KB▼ 66.56%
assets/screenshot-2.png58.86KB18.43KB▼ 68.69%