78% pi-custom-scrollbar

Code Review | Scrollbar

WordPress plugin Scrollbar scored 78% from 54 tests.

About plugin

  • Plugin page: pi-custom-scrollbar
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8
  • WordPress version: 6.3.1
  • First release: Oct 17, 2017
  • Latest release: Oct 17, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: mdimran41 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 707 total downloads

Benchmarks

Plugin footprint 83% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▲2.04ms] Passed 4 tests

This is a short check of server-side resources used by Scrollbar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.69 ▲4.17
Dashboard /wp-admin3.36 ▲0.0553.67 ▲10.13
Posts /wp-admin/edit.php3.47 ▲0.1146.99 ▲3.00
Add New Post /wp-admin/post-new.php5.91 ▲0.0380.19 ▼0.27
Media Library /wp-admin/upload.php3.26 ▲0.0335.89 ▲1.27

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
pi_custom_scrollbar_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Scrollbar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,198 ▲40915.64 ▲1.0116.67 ▲14.9043.92 ▲0.50
Dashboard /wp-admin2,376 ▲1736.57 ▲0.74123.43 ▲30.3036.95 ▼1.30
Posts /wp-admin/edit.php2,285 ▲1933.65 ▲1.6351.26 ▲17.3632.13 ▲1.50
Add New Post /wp-admin/post-new.php1,539 ▼323.15 ▲4.89618.83 ▼39.9837.99 ▼26.53
Media Library /wp-admin/upload.php1,415 ▲274.32 ▲0.2082.20 ▼35.5741.98 ▼4.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • pi_custom_scrollbar_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pi-custom-scrollbar/inc/js/custom.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/pi-custom-scrollbar/main.php:18

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
6 plugin tags: wordpress scrollbar, navigation, scroll, scrollbars, custom scrollbar...

pi-custom-scrollbar/main.php 85% from 13 tests

The entry point to "Scrollbar" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("pi-custom-scrollbar.php" instead of "main.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
No dangerous file extensions were detected3,564 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2672672,999
PHP5143193565

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity36.00
▷ Minimum class complexity3.00
▷ Maximum class complexity69.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
No PNG files were detected