84% simple-scroll-to-top-button

Code Review | Simple Scroll to Top Button

WordPress plugin Simple Scroll to Top Button scored 84% from 54 tests.

About plugin

  • Plugin page: simple-scroll-to-...
  • Plugin version: 4.46
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8
  • WordPress version: 5.8.1
  • First release: Feb 27, 2016
  • Latest release: Sep 6, 2021
  • Number of updates: 98
  • Update frequency: every 20.6 days
  • Top authors: Arthur Gareginyan (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

10,000+ active / 151,587 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼138.06ms] Passed 4 tests

An overview of server-side resources used by Simple Scroll to Top Button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.94 ▲0.2236.99 ▲13.40
Dashboard /wp-admin3.16 ▲0.1150.29 ▲5.96
Posts /wp-admin/edit.php3.27 ▲0.1747.86 ▲0.78
Add New Post /wp-admin/post-new.php5.52 ▲0.0994.96 ▼558.43
Media Library /wp-admin/upload.php3.10 ▲0.1033.62 ▼0.53
Scroll to Top /wp-admin/options-general.php?page=simple-scroll-to-top-button3.2133.01

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 1 new option
New WordPress options
spacexchimp_p008_service_info

Browser metrics Passed 4 tests

Checking browser requirements for Simple Scroll to Top Button
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,845 ▲24916.12 ▲0.2514.54 ▲6.8558.54 ▲5.53
Dashboard /wp-admin2,978 ▲475.91 ▼0.04147.82 ▲10.29110.59 ▼0.92
Posts /wp-admin/edit.php2,744 ▲52.68 ▼0.0067.71 ▼2.5590.00 ▲0.11
Add New Post /wp-admin/post-new.php1,675 ▲17718.78 ▼0.15366.51 ▼15.84110.79 ▼0.82
Media Library /wp-admin/upload.php1,815 ▲85.10 ▲0.06159.97 ▲8.03125.96 ▼2.23
Scroll to Top /wp-admin/options-general.php?page=simple-scroll-to-top-button3,7193.5289.23122.69

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • spacexchimp_p008_service_info

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
  • 15× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/simple-scroll-to-top-button/inc/php/tabs/support.php
    • > /wp-content/plugins/simple-scroll-to-top-button/inc/php/inline-js.php
    • > /wp-content/plugins/simple-scroll-to-top-button/inc/php/enqueue.php
    • > /wp-content/plugins/simple-scroll-to-top-button/inc/php/page.php
    • > /wp-content/plugins/simple-scroll-to-top-button/inc/php/sidebar.php
    • > /wp-content/plugins/simple-scroll-to-top-button/inc/php/controls.php
    • > /wp-content/plugins/simple-scroll-to-top-button/inc/php/functional.php
    • > /wp-content/plugins/simple-scroll-to-top-button/inc/php/messages.php
    • > /wp-content/plugins/simple-scroll-to-top-button/inc/php/versioning.php
    • > /wp-content/plugins/simple-scroll-to-top-button/inc/php/tabs/faq.php

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: You are using too many tags: 38 tag instead of maximum 10
You can look at the official readme.txt

simple-scroll-to-top-button/simple-scroll-to-top-button.php Passed 13 tests

The main file in "Simple Scroll to Top Button" v. 4.46 serves as a complement to information provided in readme.txt and as the entry point to the plugin
73 characters long description:
Easily and safely add a "Scroll to Top" button to your WordPress website.

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
Good job! No executable or dangerous file extensions detected6,371 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
SVG2102,677
PO File58148381,780
PHP162713571,224
CSS53080589
JavaScript42237101

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions32
▷ Named functions32100.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
2 compressed PNG files occupy 0.03MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/img/spacexchimp-logo.png21.01KB14.98KB▼ 28.69%
inc/img/thanks.png9.03KB9.47KB0.00%