73% easy-smooth-scroll-links

Code Review | Easy Smooth Scroll Links - Smooth Scrolling Anchor

WordPress plugin Easy Smooth Scroll Links - Smooth Scrolling Anchor scored 73% from 54 tests.

About plugin

  • Plugin page: easy-smooth-scrol...
  • Plugin version: 2.23.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9.0
  • WordPress version: 5.9.2
  • First release: Aug 2, 2011
  • Latest release: Mar 21, 2022
  • Number of updates: 101
  • Update frequency: every 38.6 days
  • Top authors: Jeriff Cheng (79.21%)WebFactory (17.82%)shramee (4.95%)

Code review

54 tests

User reviews

88 reviews

Install metrics

50,000+ active / 442,803 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▲4.70MB] [CPU: ▼266.89ms] 75% from 4 tests

An overview of server-side resources used by Easy Smooth Scroll Links - Smooth Scrolling Anchor
The following require your attention
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,539.13ms on /wp-admin/options-general.php?page=essl-plugin-options_options)
PageMemory (MB)CPU Time (ms)
Home /8.67 ▲5.1678.61 ▲28.75
Dashboard /wp-admin8.69 ▲5.2858.68 ▲25.26
Posts /wp-admin/edit.php8.69 ▲5.0557.27 ▲19.91
Add New Post /wp-admin/post-new.php10.26 ▲3.29116.89 ▼1,127.88
Media Library /wp-admin/upload.php8.69 ▲5.3947.42 ▲15.14
Easy Smooth Scroll Links /wp-admin/options-general.php?page=essl-plugin-options_options8.691,539.13
Freemius Debug [v.2.5.0.1] /wp-admin/admin.php?page=freemius8.6944.98

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 170 new files
Database: no new tables, 4 new options
New WordPress options
fs_active_plugins
fs_debug_mode
fs_accounts
fs_gdpr

Browser metrics Passed 4 tests

A check of browser resources used by Easy Smooth Scroll Links - Smooth Scrolling Anchor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,944 ▲20016.11 ▲0.409.88 ▲3.892.68 ▲0.66
Dashboard /wp-admin2,925 ▲746.16 ▼0.10113.40 ▼26.66164.05 ▲1.33
Posts /wp-admin/edit.php2,724 ▲363.24 ▼0.0162.79 ▼0.12159.18 ▲19.67
Add New Post /wp-admin/post-new.php1,674 ▼9922.06 ▲1.04395.27 ▼71.23156.81 ▲0.74
Media Library /wp-admin/upload.php1,731 ▲335.52 ▼0.05144.73 ▲3.04202.21 ▲15.82
Easy Smooth Scroll Links /wp-admin/options-general.php?page=essl-plugin-options_options1,3742.4452.68161.86
Freemius Debug [v.2.5.0.1] /wp-admin/admin.php?page=freemius1,4352.7353.23113.27

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/easy-smooth-scroll-links/wp-sdk/includes/class-freemius.php+8911
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 4 options
    • fs_debug_mode
    • fs_accounts
    • fs_active_plugins
    • fs_gdpr

Smoke tests 75% 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-smooth-scroll-links/index.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/easy-smooth-scroll-links/options.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

easy-smooth-scroll-links/index.php 92% from 13 tests

The principal PHP file in "Easy Smooth Scroll Links - Smooth Scrolling Anchor" v. 2.23.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-smooth-scroll-links.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin32,879 lines of code in 128 files:
LanguageFilesBlank linesComment linesLines of code
PHP1127,76316,82732,672
JavaScript43459195
CSS120012

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,029)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity92.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3,029.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes47
▷ Abstract classes24.26%
▷ Concrete classes4595.74%
▷ Final classes00.00%
Methods1,205
▷ Static methods18615.44%
▷ Public methods84670.21%
▷ Protected methods151.24%
▷ Private methods34428.55%
Functions103
▷ Named functions103100.00%
▷ Anonymous functions00.00%
Constants132
▷ Global constants10075.76%
▷ Class constants3224.24%
▷ Public constants32100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wp-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
wp-sdk/assets/img/Easy_Smooth_Scroll_Links.png26.13KB8.97KB▼ 65.66%
wp-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%