84% scroll-up

Code Review | Scroll Up

WordPress plugin Scroll Up scored84%from 54 tests.

About plugin

  • Plugin page: scroll-up
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.0
  • WordPress version: 6.3.1
  • First release: Aug 26, 2014
  • Latest release: Sep 21, 2014
  • Number of updates: 45
  • Update frequency: every 0.6 days
  • Top authors: morshed_wordpress (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /4,572 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.02MB] [CPU: ▼3.61ms] Passed 4 tests

This is a short check of server-side resources used by Scroll Up
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.96 ▲0.88
Dashboard /wp-admin3.33 ▲0.0249.37 ▼0.20
Posts /wp-admin/edit.php3.38 ▲0.0254.21 ▼2.39
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.81 ▼6.99
Media Library /wp-admin/upload.php3.25 ▲0.0235.79 ▼4.85

Server storage [IO: ▲0.01MB] [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: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Scroll Up
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲16113.50 ▼0.8510.55 ▲8.7942.62 ▼0.04
Dashboard /wp-admin2,214 ▲375.57 ▲0.0485.59 ▼9.3340.27 ▲0.50
Posts /wp-admin/edit.php2,119 ▲192.00 ▲0.0240.24 ▼1.7936.14 ▼3.08
Add New Post /wp-admin/post-new.php1,540 ▲1423.07 ▼0.01650.94 ▲50.2763.55 ▲9.14
Media Library /wp-admin/upload.php1,413 ▲194.17 ▼0.03103.92 ▲5.8644.03 ▲1.65

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/scroll-up/scroll_to_top.php:31
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/scroll-up/scroll_to_top.php on line 31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: scroll up, scroll to top, wordpress scroll up, wordpress, jquery scroll up

scroll-up/scroll_to_top.php 85% from 13 tests

The entry point to "Scroll Up" version 1.1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("scroll-up.php" instead of "scroll_to_top.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 145 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected222 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12423121
PHP1493188
CSS11113

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/top.png0.68KB0.69KB0.00%