84% simple-scroll-to-top

Code Review | Simple Scroll To Top

WordPress plugin Simple Scroll To Top scored84%from 54 tests.

About plugin

  • Plugin page: simple-scroll-to-top
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.9
  • WordPress version: 6.3.1
  • First release: Jul 20, 2013
  • Latest release: Nov 26, 2017
  • Number of updates: 7
  • Update frequency: every 227.3 days
  • Top authors: mrvijayakumar (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /6,868 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.66ms] Passed 4 tests

Server-side resources used by Simple Scroll To Top
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.84 ▼8.54
Dashboard /wp-admin3.31 ▲0.0145.22 ▼3.78
Posts /wp-admin/edit.php3.36 ▲0.0045.44 ▼3.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.36 ▼6.99
Media Library /wp-admin/upload.php3.23 ▲0.0033.18 ▼0.19

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Simple Scroll To Top
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲18114.02 ▼0.505.79 ▲3.9338.07 ▼12.52
Dashboard /wp-admin2,206 ▲184.86 ▼0.20111.44 ▼3.2542.31 ▼0.18
Posts /wp-admin/edit.php2,089 ▲32.04 ▲0.0138.59 ▲2.1135.37 ▲1.17
Add New Post /wp-admin/post-new.php1,542 ▲822.86 ▼0.15663.09 ▼14.6151.30 ▼5.53
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0292.15 ▼22.9640.42 ▼7.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-scroll-to-top/simple_scroll_top.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: scroll to top, smooth back to top, back to top

simple-scroll-to-top/simple_scroll_top.php 92% from 13 tests

The entry point to "Simple Scroll To Top" version 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: The principal plugin file should be the same as the plugin slug ("simple-scroll-to-top.php" instead of "simple_scroll_top.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin14 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP101112
JavaScript1012

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin