78% sc-scrollup

Code Review | SC Scrollup - Extremely lightweight and customizable scroll to top plugin

WordPress plugin SC Scrollup - Extremely lightweight and customizable scroll to top plugin scored78%from 54 tests.

About plugin

  • Plugin page: sc-scrollup
  • Plugin version: 1.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 7, 2014
  • Latest release: Nov 25, 2021
  • Number of updates: 13
  • Update frequency: every 205.2 days
  • Top authors: stylishcreativity (76.92%)mashiurz (30.77%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /1,291 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼10.26ms] Passed 4 tests

This is a short check of server-side resources used by SC Scrollup - Extremely lightweight and customizable scroll to top plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.08 ▼0.13
Dashboard /wp-admin3.33 ▼0.0145.81 ▼18.08
Posts /wp-admin/edit.php3.39 ▲0.0341.64 ▼4.90
Add New Post /wp-admin/post-new.php5.91 ▲0.0377.60 ▼17.52
Media Library /wp-admin/upload.php3.26 ▲0.0336.21 ▼0.52
Scroll UP /wp-admin/options-general.php?page=scup-setting3.2331.28

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for SC Scrollup - Extremely lightweight and customizable scroll to top plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲16813.51 ▼1.119.61 ▲7.8939.41 ▼1.59
Dashboard /wp-admin2,202 ▲255.62 ▼0.0685.30 ▲0.2540.98 ▼3.19
Posts /wp-admin/edit.php2,104 ▲41.96 ▲0.0034.35 ▲0.6833.28 ▼4.05
Add New Post /wp-admin/post-new.php1,529 ▲323.24 ▲0.05650.31 ▲7.8659.19 ▲9.87
Media Library /wp-admin/upload.php1,404 ▲14.12 ▼0.00108.03 ▼0.5946.06 ▼2.49
Scroll UP /wp-admin/options-general.php?page=scup-setting9792.0223.0039.10

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
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sc-scrollup/inc/settings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sc-scrollup/sc-scrollup.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sc-scrollup/inc/front.php:87

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=scup-setting
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=scup-setting 149 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please a description for screenshot #2 in sc-scrollup/assets to your readme.txt
The official readme.txt is a good inspiration

sc-scrollup/sc-scrollup.php 92% from 13 tests

The main PHP script in "SC Scrollup - Extremely lightweight and customizable scroll to top plugin" version 1.5 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 219 characters long)

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
There were no executable files found in this plugin457 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP35322310
CSS184115
JavaScript111132

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
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
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/ucfw-banner.png61.10KB24.74KB▼ 59.50%