74% easy-scroll-to-top

Code Review | Easy Scroll To Top

WordPress plugin Easy Scroll To Top scored74%from 54 tests.

About plugin

  • Plugin page: easy-scroll-to-top
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Oct 13, 2015
  • Latest release: Nov 26, 2015
  • Number of updates: 20
  • Update frequency: every 2.2 days
  • Top authors: Arifpress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,701 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.94MB] [CPU: ▼54.37ms] Passed 4 tests

Server-side resources used by Easy Scroll To Top
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.423.93 ▼35.45
Dashboard /wp-admin2.06 ▼1.244.60 ▼52.10
Posts /wp-admin/edit.php2.06 ▼1.295.28 ▼45.02
Add New Post /wp-admin/post-new.php2.06 ▼3.825.33 ▼84.91
Media Library /wp-admin/upload.php2.06 ▼1.175.64 ▼32.36

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Easy Scroll To Top
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲16213.86 ▼0.508.84 ▲7.2440.36 ▼2.87
Dashboard /wp-admin2,205 ▲285.67 ▼0.0199.18 ▲9.1243.10 ▲0.97
Posts /wp-admin/edit.php2,116 ▲132.05 ▲0.0540.22 ▼0.8034.74 ▼4.54
Add New Post /wp-admin/post-new.php1,535 ▼223.54 ▲5.20614.64 ▼26.5656.86 ▼1.05
Media Library /wp-admin/upload.php1,413 ▲134.26 ▲0.08105.13 ▲5.1544.21 ▼2.15

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
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the es_to_top_easing handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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
Good news, no errors were detected

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-scroll-to-top/scroll_up_plugin_hook.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: back to top, jquery, smooth scroll, to top, scroll to top...

easy-scroll-to-top/scroll_up_plugin_hook.php 92% from 13 tests

This is the main PHP file of "Easy Scroll To Top" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("easy-scroll-to-top.php" instead of "scroll_up_plugin_hook.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin163 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3470145
PHP151110
CSS1008

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/up.png1.40KB1.22KB▼ 12.81%