84% smooth-page-scroll-updown-buttons

Code Review | Smooth Page Scroll Up/Down Buttons

WordPress plugin Smooth Page Scroll Up/Down Buttons scored84%from 54 tests.

About plugin

  • Plugin page: smooth-page-scrol...
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: Nov 4, 2014
  • Latest release: Mar 18, 2023
  • Number of updates: 48
  • Update frequency: every 63.7 days
  • Top authors: senff (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

3,000+ active /41,594 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.91ms] Passed 4 tests

An overview of server-side resources used by Smooth Page Scroll Up/Down Buttons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0541.62 ▲2.66
Dashboard /wp-admin3.35 ▲0.0545.02 ▼3.19
Posts /wp-admin/edit.php3.40 ▲0.0446.47 ▲2.84
Add New Post /wp-admin/post-new.php5.93 ▲0.0479.55 ▼9.59
Media Library /wp-admin/upload.php3.28 ▲0.0436.18 ▼1.53
Smooth Scroll Page Up/Down Buttons /wp-admin/options-general.php?page=pagescrollupdownmenu3.2429.57

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
page_scroll_buttons_options

Browser metrics Passed 4 tests

An overview of browser requirements for Smooth Page Scroll Up/Down Buttons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲21213.73 ▼1.0516.75 ▲14.9338.15 ▼6.36
Dashboard /wp-admin2,210 ▲254.84 ▼0.98111.16 ▼15.2338.63 ▼4.43
Posts /wp-admin/edit.php2,093 ▲72.06 ▲0.0337.47 ▲0.9034.45 ▼0.87
Add New Post /wp-admin/post-new.php1,517 ▼2317.69 ▼5.61696.82 ▲29.8856.30 ▼3.37
Media Library /wp-admin/upload.php1,392 ▲44.16 ▼0.0995.76 ▼14.8646.57 ▼1.27
Smooth Scroll Page Up/Down Buttons /wp-admin/options-general.php?page=pagescrollupdownmenu9451.6924.2428.06

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/smooth-page-scroll-updown-buttons/smooth-page-scroll-updown-buttons.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: page, top, buttons, smooth scroll

smooth-page-scroll-updown-buttons/smooth-page-scroll-updown-buttons.php Passed 13 tests

The entry point to "Smooth Page Scroll Up/Down Buttons" version 1.4.1 is a PHP file that has certain tags in its header comment area
103 characters long description:
Adds buttons to your page that will enable the user to easily (and smoothly) scroll one screen up/down.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin547 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP38820256
JavaScript44521148
CSS214072
Markdown135071

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.67
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
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/spsb-arrow-up.png1.41KB0.50KB▼ 64.41%
assets/img/spsb-arrow-down.png1.42KB0.52KB▼ 63.43%
assets/img/spsb-arrow-top.png1.42KB0.51KB▼ 63.97%
assets/img/spsb-sprite.png8.07KB2.57KB▼ 68.20%