73% winsome-nice-scrollbar

Code Review | Winsome Nice Scrollbar

WordPress plugin Winsome Nice Scrollbar scored73%from 54 tests.

About plugin

  • Plugin page: winsome-nice-scro...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Apr 30, 2015
  • Latest release: Apr 30, 2015
  • Number of updates: 10
  • Update frequency: every 3.2 days
  • Top authors: masumabdullah (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /936 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.51MB] [CPU: ▼37.78ms] Passed 4 tests

Analyzing server-side resources used by Winsome Nice Scrollbar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.45 ▼0.0115.07 ▼20.59
Dashboard /wp-admin3.50 ▲0.2018.88 ▼28.65
Posts /wp-admin/edit.php3.50 ▲0.1519.90 ▼31.97
Add New Post /wp-admin/post-new.php3.50 ▼2.3823.97 ▼69.92
Media Library /wp-admin/upload.php3.50 ▲0.2820.50 ▼13.10

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 195 new files
Database: no new tables, 7 new options
New WordPress options
vpt_option
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Winsome Nice Scrollbar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,020 ▲27413.92 ▼0.4813.61 ▲11.7838.45 ▼6.07
Dashboard /wp-admin2,224 ▲394.86 ▼0.01107.49 ▼3.4040.46 ▲3.11
Posts /wp-admin/edit.php2,110 ▲242.04 ▲0.0339.06 ▲2.3734.18 ▼0.96
Add New Post /wp-admin/post-new.php1,553 ▲1123.11 ▲4.85655.47 ▲51.2954.10 ▼9.02
Media Library /wp-admin/upload.php1,409 ▲184.25 ▲0.05106.22 ▲5.6144.48 ▲3.37

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/winsome-nice-scrollbar/vafpress/includes/wpalchemy/MetaBox.php+61
    Methods with the same name as their class will not be constructors in a future version of PHP; WPAlchemy_MetaBox has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • vpt_option
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 114× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_Field' not found in wp-content/plugins/winsome-nice-scrollbar/vafpress/classes/control/field/textbox.php:3
    • > PHP Notice
      Undefined variable: is_compact in wp-content/plugins/winsome-nice-scrollbar/vafpress/views/control/toggle.php on line 1
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/winsome-nice-scrollbar/vafpress/views/control/html.php on line 3
    • > PHP Warning
      Use of undefined constant VP_PUBLIC_URL - assumed 'VP_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/winsome-nice-scrollbar/vafpress/config/dependencies.php on line 94
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Option_Control_Group' not found in wp-content/plugins/winsome-nice-scrollbar/vafpress/classes/option/control/group/section.php:3
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/winsome-nice-scrollbar/vafpress/views/control/html.php on line 4
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/winsome-nice-scrollbar/vafpress/views/control/notebox.php on line 5
    • > PHP Warning
      Use of undefined constant VP_PUBLIC_URL - assumed 'VP_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/winsome-nice-scrollbar/vafpress/config/dependencies.php on line 172
    • > PHP Warning
      Use of undefined constant VP_NAMESPACE - assumed 'VP_NAMESPACE' (this will throw an Error in a future version of PHP) in wp-content/plugins/winsome-nice-scrollbar/vafpress/autoload.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'VP_View' not found in wp-content/plugins/winsome-nice-scrollbar/vafpress/views/control/checkimage.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Contributors: Plugin contributors not specified
  • Screenshots: Screenshot #2 (admin panel) image missing
Please take inspiration from this readme.txt

winsome-nice-scrollbar/plugin-main.php 92% from 13 tests

"Winsome Nice Scrollbar" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("winsome-nice-scrollbar.php" instead of "plugin-main.php")

Code Analysis 97% from 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 detected15,499 lines of code in 155 files:
LanguageFilesBlank linesComment linesLines of code
PHP892,0272,2958,614
CSS141541763,309
JavaScript484472983,072
SVG100414
Markdown231089
JSON1001

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 102)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity21.38
▷ Minimum class complexity1.00
▷ Maximum class complexity271.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity102.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes56
▷ Abstract classes47.14%
▷ Concrete classes5292.86%
▷ Final classes00.00%
Methods505
▷ Static methods8917.62%
▷ Public methods47293.47%
▷ Protected methods193.76%
▷ Private methods142.77%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants36
▷ Global constants3391.67%
▷ Class constants38.33%
▷ Public constants3100.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
22 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vafpress/public/img/vp-sprite.png12.79KB4.90KB▼ 61.71%
vafpress/public/css/vendor/jqueryui/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
vafpress/public/img/vp_shortcode_icon_sprite.png1.55KB0.42KB▼ 73.10%
vafpress/public/css/vendor/jqueryui/themes/smoothness/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
vafpress/public/css/vendor/jqueryui/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%