84% smooth-scroll-up

Code Review | Smooth Scroll Up

WordPress plugin Smooth Scroll Up scored 84% from 54 tests.

About plugin

  • Plugin page: smooth-scroll-up
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.0.3
  • WordPress version: 6.3.1
  • First release: Mar 21, 2013
  • Latest release: Jan 18, 2019
  • Number of updates: 86
  • Update frequency: every 24.8 days
  • Top authors: kouratoras (100%)

Code review

54 tests

User reviews

59 reviews

Install metrics

10,000+ active / 165,007 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
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.35ms] Passed 4 tests

Analyzing server-side resources used by Smooth Scroll Up
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0642.04 ▲3.47
Dashboard /wp-admin3.36 ▲0.0544.57 ▼3.19
Posts /wp-admin/edit.php3.41 ▲0.0544.37 ▼1.67
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.87 ▼1.76
Media Library /wp-admin/upload.php3.28 ▲0.0534.21 ▲1.21
Smooth Scroll Up /wp-admin/options-general.php?page=smooth-scroll-up3.3036.36

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Smooth Scroll Up
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲15413.51 ▼0.877.22 ▲5.5438.60 ▼1.77
Dashboard /wp-admin2,210 ▲185.87 ▲0.93107.59 ▼9.1643.02 ▲0.63
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0439.08 ▼0.7135.46 ▲0.56
Add New Post /wp-admin/post-new.php1,517 ▼1717.86 ▼5.33588.11 ▼88.5542.64 ▼8.46
Media Library /wp-admin/upload.php1,395 ▲44.19 ▲0.0298.49 ▼5.2040.82 ▼4.03
Smooth Scroll Up /wp-admin/options-general.php?page=smooth-scroll-up4,3063.3447.9846.06

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smooth-scroll-up/plugin.php:28

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

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can take inspiration from this readme.txt

smooth-scroll-up/plugin.php 92% from 13 tests

"Smooth Scroll Up" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("smooth-scroll-up.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin4,762 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PO File189331,1272,047
PHP63117201,849
SVG100685
CSS31410100
JavaScript2101081

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity41.60
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods72
▷ Static methods1013.89%
▷ Public methods7097.22%
▷ Protected methods22.78%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants218.18%
▷ Class constants981.82%
▷ Public constants9100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/scrollup.png0.68KB0.69KB0.00%