84% custom-content-scrollbar

Code Review | Custom Content Scrollbar

WordPress plugin Custom Content Scrollbar scored 84% from 54 tests.

About plugin

  • Plugin page: custom-content-sc...
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 25, 2017
  • Latest release: Sep 15, 2021
  • Number of updates: 17
  • Update frequency: every 83.7 days
  • Top authors: softhopper (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 3,743 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼1.15ms] Passed 4 tests

A check of server-side resources used by Custom Content Scrollbar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1435.05 ▼8.89
Dashboard /wp-admin3.51 ▲0.2146.56 ▼3.24
Posts /wp-admin/edit.php3.56 ▲0.2149.74 ▲3.96
Add New Post /wp-admin/post-new.php6.12 ▲0.2397.19 ▲9.49
Media Library /wp-admin/upload.php3.44 ▲0.2137.32 ▲3.59
SH Scrollbar Options /wp-admin/options-general.php?page=sh-custom-scrollbar-settings3.4133.16

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Content Scrollbar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,765 ▲3014.06 ▼0.3319.86 ▲17.9746.95 ▲3.45
Dashboard /wp-admin2,232 ▲585.11 ▼0.92105.13 ▼4.3139.78 ▼14.85
Posts /wp-admin/edit.php2,117 ▲282.32 ▲0.3037.95 ▼1.0831.99 ▼3.51
Add New Post /wp-admin/post-new.php2,684 ▲1,16323.84 ▲0.64642.88 ▼48.5432.76 ▼27.98
Media Library /wp-admin/upload.php1,411 ▲234.46 ▲0.2497.49 ▼9.5143.18 ▼3.07
SH Scrollbar Options /wp-admin/options-general.php?page=sh-custom-scrollbar-settings2,0913.1761.4127.14

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: scrollbar_options_value in wp-content/plugins/custom-content-scrollbar/includes/scrollbar-shortcode.php on line 420
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-content-scrollbar/includes/scrollbar-option-panel.php:6
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/custom-content-scrollbar/includes/scrollbar-shortcode.php on line 605
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/custom-content-scrollbar/includes/scrollbar-shortcode.php:621
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-content-scrollbar/includes/scrollbar-activation-scripts.php:48
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/custom-content-scrollbar/includes/scrollbar-shortcode.php on line 424
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/custom-content-scrollbar/includes/scrollbar-shortcode.php on line 420
    • > PHP Notice
      Undefined variable: number_text_list in wp-content/plugins/custom-content-scrollbar/includes/scrollbar-shortcode.php on line 423

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: multi-style scrollbar, multi-functional scrollbar, awesome scrollbar, scrollbar wordpress, custom scrollbar...

custom-content-scrollbar/custom-content-scrollbar.php 92% from 13 tests

The principal PHP file in "Custom Content Scrollbar" v. 1.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 260 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected4,036 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript62706071,887
PHP482511,199
CSS3345113950

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions17
▷ Named functions1376.47%
▷ Anonymous functions423.53%
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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/mCSB_buttons.png2.93KB0.99KB▼ 66.18%