83% simple-scroll-top-wp

Code Review | Scroll To Top WP

WordPress plugin Scroll To Top WP scored83%from 54 tests.

About plugin

  • Plugin page: simple-scroll-top-wp
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 21, 2022
  • Latest release: Feb 6, 2023
  • Number of updates: 7
  • Update frequency: every 6.7 days
  • Top authors: shovoalways (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active /1,544 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.08ms] Passed 4 tests

An overview of server-side resources used by Scroll To Top WP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0149.21 ▲2.22
Dashboard /wp-admin3.31 ▲0.0147.97 ▼4.31
Posts /wp-admin/edit.php3.37 ▲0.0152.07 ▼8.28
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.63 ▼21.96
Media Library /wp-admin/upload.php3.24 ▲0.0137.53 ▲2.74

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Scroll To Top WP: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲13913.95 ▼0.409.55 ▲7.9040.04 ▼1.90
Dashboard /wp-admin2,213 ▲365.60 ▲0.1090.83 ▼18.2940.80 ▼5.59
Posts /wp-admin/edit.php2,118 ▲211.99 ▲0.0535.65 ▼0.6634.81 ▲1.06
Add New Post /wp-admin/post-new.php1,541 ▲1323.17 ▲0.33616.68 ▼47.2458.78 ▼3.98
Media Library /wp-admin/upload.php1,418 ▲274.17 ▼0.0195.79 ▼8.7941.33 ▼0.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
  • 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/simple-scroll-top-wp/simple-scroll-to-top-wp.php:22

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: You can take inspiration from this readme.txt

simple-scroll-top-wp/simple-scroll-to-top-wp.php 85% from 13 tests

The main PHP script in "Scroll To Top WP" version 2.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-scroll-top-wp.php" instead of "simple-scroll-to-top-wp.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin228 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS222129
PHP1303098
JavaScript1061

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/top.png1.11KB0.19KB▼ 82.70%
img/author.png35.63KB13.20KB▼ 62.95%
img/buyme.png5.24KB2.76KB▼ 47.31%