68% easy-smooth-scroll-links

Code Review | Easy Smooth Scroll Links - Smooth Scrolling Anchor

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

About plugin

  • Plugin page: easy-smooth-scrol...
  • Plugin version: 2.23.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8+
  • WordPress version: 5.8.1
  • First release: Aug 2, 2011
  • Latest release: Mar 8, 2021
  • Number of updates: 98
  • Update frequency: every 35.9 days
  • Top authors: Jeriff Cheng (81.63%)WebFactory (18.37%)shramee (2.04%)

Code review

54 tests

User reviews

85 reviews

Install metrics

50,000+ active / 424,057 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: ▲0.46MB] [CPU: ▼140.11ms] Passed 4 tests

An overview of server-side resources used by Easy Smooth Scroll Links - Smooth Scrolling Anchor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.22 ▲0.3835.71 ▲4.05
Dashboard /wp-admin3.63 ▲0.5845.04 ▲2.94
Posts /wp-admin/edit.php3.69 ▲0.5837.84 ▼6.87
Add New Post /wp-admin/post-new.php5.93 ▲0.5092.79 ▼548.94
Media Library /wp-admin/upload.php3.41 ▲0.4029.02 ▼7.57
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius3.7527.76
Easy Smooth Scroll Links /wp-admin/options-general.php?page=essl-plugin-options_options3.7831.45

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 165 new files
Database: no new tables, 4 new options
New WordPress options
fs_active_plugins
fs_accounts
fs_debug_mode
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,849 ▲25316.32 ▲0.8912.79 ▲4.1242.78 ▼7.18
Dashboard /wp-admin3,000 ▲735.89 ▼0.03143.11 ▼3.74117.32 ▲5.02
Posts /wp-admin/edit.php2,775 ▲362.70 ▲0.0164.62 ▲1.2896.45 ▲9.97
Add New Post /wp-admin/post-new.php1,883 ▲21119.19 ▲0.33372.60 ▲5.66108.21 ▲5.76
Media Library /wp-admin/upload.php1,770 ▼375.02 ▼0.02150.26 ▲4.77119.59 ▼7.26
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius1,4552.1053.9671.46
Easy Smooth Scroll Links /wp-admin/options-general.php?page=essl-plugin-options_options1,3372.1559.82105.38

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+8540
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 4 options
    • fs_debug_mode
    • fs_gdpr
    • fs_accounts
    • fs_active_plugins

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

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/easy-smooth-scroll-links/wp-sdk/templates/ajax-loader.php
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/easy-smooth-scroll-links/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/easy-smooth-scroll-links/wp-sdk/templates/partials/network-activation.php:6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/easy-smooth-scroll-links/wp-sdk/templates/account/partials/addon.php on line 7
    • > 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 a member function get_slug() on null in wp-content/plugins/easy-smooth-scroll-links/wp-sdk/templates/account/partials/addon.php:9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/easy-smooth-scroll-links/wp-sdk/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/easy-smooth-scroll-links/wp-sdk/templates/account/partials/addon.php on line 6
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/easy-smooth-scroll-links/wp-sdk/templates/account/partials/addon.php on line 8
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/easy-smooth-scroll-links/wp-sdk/templates/account/partials/addon.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/easy-smooth-scroll-links/wp-sdk/templates/account/partials/addon.php on line 6

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: 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.0 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 plugin30,892 lines of code in 124 files:
LanguageFilesBlank linesComment linesLines of code
PHP1097,25316,10130,683
JavaScript43459195
CSS110014

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 2,895)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity88.02
▷ Minimum class complexity1.00
▷ Maximum class complexity2,895.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes46
▷ Abstract classes24.35%
▷ Concrete classes4495.65%
▷ Final classes00.00%
Methods1,137
▷ Static methods17715.57%
▷ Public methods79569.92%
▷ Protected methods151.32%
▷ Private methods32728.76%
Functions103
▷ Named functions103100.00%
▷ Anonymous functions00.00%
Constants125
▷ Global constants10080.00%
▷ Class constants2520.00%
▷ Public constants25100.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.03MB with 0.01MB 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.png9.16KB5.26KB▼ 42.58%
wp-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%