84% better-smooth-scroll

Code Review | Better Smooth Scroll

WordPress plugin Better Smooth Scroll scored84%from 54 tests.

About plugin

  • Plugin page: better-smooth-scroll
  • Plugin version: 0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2022
  • Latest release: Feb 4, 2023
  • Number of updates: 3
  • Update frequency: every 20.0 days
  • Top authors: maheshmthorat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /695 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.30MB] [CPU: ▼18.18ms] Passed 4 tests

A check of server-side resources used by Better Smooth Scroll
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.355.63 ▼38.33
Dashboard /wp-admin3.37 ▲0.0249.83 ▼17.67
Posts /wp-admin/edit.php3.48 ▲0.1250.66 ▼5.62
Add New Post /wp-admin/post-new.php5.95 ▲0.0695.49 ▼11.11
Media Library /wp-admin/upload.php3.29 ▲0.0639.32 ▲3.37
Better Smooth Scroll /wp-admin/options-general.php?page=better-smooth-scroll-admin3.2430.37

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
_bss_smooth_scroll
theysaidso_admin_options
better-smooth-scroll
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Better Smooth Scroll
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲10613.67 ▼1.117.79 ▲6.1945.74 ▼0.05
Dashboard /wp-admin2,204 ▲275.62 ▲0.0492.62 ▼0.7743.37 ▲1.06
Posts /wp-admin/edit.php2,106 ▲62.01 ▲0.0336.77 ▼7.0331.94 ▼7.30
Add New Post /wp-admin/post-new.php1,533 ▼423.40 ▲4.98646.00 ▲5.3350.92 ▼17.13
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0797.37 ▼20.2043.87 ▼0.63
Better Smooth Scroll /wp-admin/options-general.php?page=better-smooth-scroll-admin1,0491.8223.2547.10

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-posts
    • better-smooth-scroll
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • _bss_smooth_scroll
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=better-smooth-scroll-admin
    • > Notice in wp-content/plugins/better-smooth-scroll/admin/class-better-smooth-scroll-admin.php+99
    Undefined index: con
    • > GET request to /wp-admin/options-general.php?page=better-smooth-scroll-admin
    • > Notice in wp-content/plugins/better-smooth-scroll/admin/class-better-smooth-scroll-admin.php+198
    Undefined index: scroller_width

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: smoothscroll, scrollingsmooth, smooth, scrolleffect, scroll...

better-smooth-scroll/better-smooth-scroll.php 92% from 13 tests

The main file in "Better Smooth Scroll" v. 0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 180 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
Everything looks great! No dangerous files found in this plugin891 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP53286439
CSS13320430
SVG20121
JavaScript1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity14.00
▷ Minimum class complexity8.00
▷ Maximum class complexity20.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
6 PNG files occupy 0.26MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/upi.png78.57KB29.46KB▼ 62.51%
admin/assets/img/qr.png14.84KB7.15KB▼ 51.81%
admin/assets/img/sbi.png19.66KB9.76KB▼ 50.34%
admin/assets/img/paytm.png44.70KB21.35KB▼ 52.23%
admin/assets/img/paypral.png24.14KB23.87KB▼ 1.11%