90% jquery-smooth-scroll

Code Review | jQuery Smooth Scroll

WordPress plugin jQuery Smooth Scroll scored90%from 54 tests.

About plugin

  • Plugin page: jquery-smooth-scroll
  • Plugin version: 1.4.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Oct 15, 2012
  • Latest release: Jul 3, 2019
  • Number of updates: 89
  • Update frequency: every 27.6 days
  • Top authors: BlogSynthesis (94.38%)anand_kumar (5.62%)digitalliberation (2.25%)

Code review

54 tests

User reviews

47 reviews

Install metrics

20,000+ active /256,011 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.00MB] [CPU: ▼3.08ms] Passed 4 tests

This is a short check of server-side resources used by jQuery Smooth Scroll
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.04 ▲1.92
Dashboard /wp-admin3.31 ▲0.0149.00 ▼7.76
Posts /wp-admin/edit.php3.36 ▲0.0047.63 ▼0.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.35 ▼5.13
Media Library /wp-admin/upload.php3.23 ▲0.0035.54 ▲0.98

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

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

Browser metrics Passed 4 tests

A check of browser resources used by jQuery Smooth Scroll
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲15113.61 ▼1.076.74 ▲5.1642.87 ▼4.08
Dashboard /wp-admin2,209 ▲185.86 ▲0.7899.48 ▼16.0743.18 ▲2.02
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0334.35 ▼3.0832.29 ▲0.88
Add New Post /wp-admin/post-new.php1,545 ▲2618.29 ▼5.08586.88 ▼98.8552.77 ▼10.15
Media Library /wp-admin/upload.php1,388 ▼34.24 ▲0.0594.29 ▼7.4540.99 ▼5.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: smooth scroll, scroll to top, jquery, smooth scroll anchor, top of page...

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

"jQuery Smooth Scroll" version 1.4.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 163 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin98 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2223937
JavaScript2172335
CSS211726

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/blogsynthesis-100px.png3.93KB4.04KB0.00%
screenshot-2.png1.17KB1.14KB▼ 2.33%
screenshot-1.png1.56KB1.53KB▼ 1.81%
images/arrow.png0.20KB0.27KB0.00%
images/email-16px.png0.50KB0.50KB0.00%