78% browser-scroll-bar

Code Review | Browser Scroll Bar

WordPress plugin Browser Scroll Bar scored78%from 54 tests.

About plugin

  • Plugin page: browser-scroll-bar
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Apr 7, 2020
  • Latest release: Aug 14, 2023
  • Number of updates: 9
  • Update frequency: every 136.1 days
  • Top authors: apsaraaruna (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /919 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.01MB] [CPU: ▼1.90ms] Passed 4 tests

A check of server-side resources used by Browser Scroll Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.69 ▲3.05
Dashboard /wp-admin3.33 ▼0.0148.48 ▼5.20
Posts /wp-admin/edit.php3.38 ▲0.0345.70 ▼0.43
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.18 ▼5.03
Media Library /wp-admin/upload.php3.25 ▲0.0337.11 ▲3.35
Browser Scroll Bar /wp-admin/options-general.php?page=bsb_options3.2031.31

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
bsb_display_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Browser Scroll Bar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲13813.55 ▼1.085.39 ▲3.6244.22 ▲7.09
Dashboard /wp-admin2,222 ▲415.79 ▼0.0697.47 ▼2.1741.98 ▼0.34
Posts /wp-admin/edit.php2,126 ▲292.27 ▲0.2336.85 ▲0.0932.93 ▼1.65
Add New Post /wp-admin/post-new.php1,547 ▲2123.21 ▼0.47694.36 ▲4.3964.75 ▲11.41
Media Library /wp-admin/upload.php1,430 ▲304.53 ▲0.31112.85 ▲12.9747.96 ▲1.01
Browser Scroll Bar /wp-admin/options-general.php?page=bsb_options1,4833.0171.0932.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • bsb_display_options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=bsb_options
    • > Notice in wp-content/plugins/browser-scroll-bar/admin/class-bsb-plugin-settings.php+279
    Undefined index: scrollbar_btn_width
    • > GET request to /wp-admin/options-general.php?page=bsb_options
    • > Notice in wp-content/plugins/browser-scroll-bar/admin/class-bsb-plugin-settings.php+279
    Undefined index: scrollbar_btn_height
    • > GET request to /wp-admin/options-general.php?page=bsb_options
    • > Notice in wp-content/plugins/browser-scroll-bar/admin/class-bsb-plugin-settings.php+279
    Undefined index: scrollbar_btn_bg
    • > GET request to /wp-admin/options-general.php?page=bsb_options
    • > Notice in wp-content/plugins/browser-scroll-bar/admin/class-bsb-plugin-settings.php+289
    Undefined index: scrollbar_track_bg
    • > GET request to /wp-admin/options-general.php?page=bsb_options
    • > Notice in wp-content/plugins/browser-scroll-bar/admin/class-bsb-plugin-settings.php+289
    Undefined index: scrollbar_track_border_color
    • > GET request to /wp-admin/options-general.php?page=bsb_options
    • > Notice in wp-content/plugins/browser-scroll-bar/admin/class-bsb-plugin-settings.php+289
    Undefined index: scrollbar_track_border_radius
    • > GET request to /wp-admin/options-general.php?page=bsb_options
    • > Notice in wp-content/plugins/browser-scroll-bar/admin/class-bsb-plugin-settings.php+300
    Undefined index: scrollbar_thumb_bg
    • > GET request to /wp-admin/options-general.php?page=bsb_options
    • > Notice in wp-content/plugins/browser-scroll-bar/admin/class-bsb-plugin-settings.php+300
    Undefined index: scrollbar_thumb_hover
    • > GET request to /wp-admin/options-general.php?page=bsb_options
    • > Notice in wp-content/plugins/browser-scroll-bar/admin/class-bsb-plugin-settings.php+300
    Undefined index: scrollbar_thumb_border_radius

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/browser-scroll-bar/admin/partials/bsb-plugin-admin-display.php
    • > /wp-content/plugins/browser-scroll-bar/public/partials/bsb-plugin-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: browser scroll bar, customizer, scroll, scroll bar

browser-scroll-bar/bsb-plugin.php 85% from 13 tests

The main PHP file in "Browser Scroll Bar" ver. 1.0.4 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:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("browser-scroll-bar.php" instead of "bsb-plugin.php")

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin435 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP13219608364
PO File1222560
JavaScript29549
Markdown1002
CSS2080

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.88
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.37
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3585.37%
▷ Protected methods00.00%
▷ Private methods614.63%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin