62% scroll-to-up

Code Review | Scroll UP

WordPress plugin Scroll UP scored62%from 54 tests.

About plugin

  • Plugin page: scroll-to-up
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8
  • WordPress version: 6.3.1
  • First release: Nov 11, 2015
  • Latest release: Jun 10, 2017
  • Number of updates: 24
  • Update frequency: every 24.0 days
  • Top authors: kingrayhan (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /9,592 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.30MB] [CPU: ▼32.41ms] Passed 4 tests

An overview of server-side resources used by Scroll UP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5731.11 ▼13.35
Dashboard /wp-admin3.65 ▲0.3030.27 ▼35.20
Posts /wp-admin/edit.php3.65 ▲0.2934.80 ▼15.95
Add New Post /wp-admin/post-new.php3.65 ▼2.2434.17 ▼65.13
Media Library /wp-admin/upload.php3.65 ▲0.4235.38 ▼4.32
Scroll UP /wp-admin/options-general.php?page=scroll_to_up_pro3.6528.29

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 154 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
scroll_to_up_pro_installed
can_compress_scripts
db_upgraded
scroll_to_up_pro
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Scroll UP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,116 ▲35515.45 ▲1.097.17 ▲5.4040.41 ▼2.64
Dashboard /wp-admin2,401 ▲2216.65 ▲0.98130.22 ▲38.4542.14 ▼3.46
Posts /wp-admin/edit.php2,335 ▲2353.80 ▲1.8160.67 ▲16.2337.13 ▼2.34
Add New Post /wp-admin/post-new.php1,750 ▲22423.09 ▲0.09646.64 ▼63.1338.65 ▼15.60
Media Library /wp-admin/upload.php1,466 ▲664.70 ▲0.4386.48 ▼22.8545.50 ▼4.15
Scroll UP /wp-admin/options-general.php?page=scroll_to_up_pro2,6034.32123.93128.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • scroll_to_up_pro
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • scroll_to_up_pro_installed

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=scroll_to_up_pro
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 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/scroll-to-up/plugin-main.php:27

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=scroll_to_up_pro
    • > Network (severe)
    wp-content/plugins/scroll-to-up/assets/arrows/39.png - Failed to load resource: the server responded with a status of 404 (Not Found)

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 reduce the number of tags, currently 19 tag instead of maximum 10
You can take inspiration from this readme.txt

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

The main PHP script in "Scroll UP" version 2.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("scroll-to-up.php" instead of "plugin-main.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
Good job! No executable or dangerous file extensions detected34,065 lines of code in 89 files:
LanguageFilesBlank linesComment linesLines of code
JSON20015,623
CSS8211584,769
JavaScript91,0707264,303
SVG2003,311
PHP491,1948312,827
Sass124702732,527
PO File7306334705

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity13.43
▷ Minimum class complexity1.00
▷ Maximum class complexity105.00
Average method complexity5.11
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes40
▷ Abstract classes25.00%
▷ Concrete classes3895.00%
▷ Final classes00.00%
Methods121
▷ Static methods86.61%
▷ Public methods121100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions3296.97%
▷ Anonymous functions13.03%
Constants3
▷ Global constants3100.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
45 PNG files occupy 0.23MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/arrows/16.png2.13KB2.13KB0.00%
assets/arrows/9.png2.61KB2.48KB▼ 5.12%
assets/arrows/19.png4.68KB2.48KB▼ 46.87%
assets/arrows/31.png6.49KB3.13KB▼ 51.81%
assets/arrows/33.png4.62KB2.57KB▼ 44.39%