83% my-wp-scroll-to-top

Code Review | WP Scroll To Top

WordPress plugin WP Scroll To Top scored 83% from 54 tests.

About plugin

  • Plugin page: my-wp-scroll-to-top
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0.1
  • WordPress version: 6.3.1
  • First release: Oct 13, 2015
  • Latest release: Oct 13, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: Sohelwpexpert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 824 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.01MB] [CPU: ▼7.02ms] Passed 4 tests

An overview of server-side resources used by WP Scroll To Top
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0627.18 ▼13.60
Dashboard /wp-admin3.33 ▲0.0353.27 ▲5.13
Posts /wp-admin/edit.php3.38 ▲0.0342.41 ▼5.51
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.36 ▼9.14
Media Library /wp-admin/upload.php3.25 ▲0.0335.90 ▲0.19
Scroll top settings /wp-admin/options-general.php?page=scrolltop-settings3.2231.03

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

WP Scroll To Top: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲18313.80 ▼0.846.99 ▲5.4340.47 ▲3.93
Dashboard /wp-admin2,234 ▲455.09 ▲0.01103.11 ▼15.2736.38 ▼6.20
Posts /wp-admin/edit.php2,119 ▲302.29 ▲0.2638.85 ▲2.7132.27 ▼3.57
Add New Post /wp-admin/post-new.php1,537 ▲323.17 ▲0.13591.97 ▼42.0132.39 ▼18.53
Media Library /wp-admin/upload.php1,416 ▲284.57 ▲0.21101.50 ▼1.4840.64 ▼2.80
Scroll top settings /wp-admin/options-general.php?page=scrolltop-settings1,0662.4148.1726.42

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/my-wp-scroll-to-top/jeba-index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Contributors: Contributors not specified
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
The official readme.txt is a good inspiration

my-wp-scroll-to-top/jeba-index.php 92% from 13 tests

The main file in "WP Scroll To Top" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("my-wp-scroll-to-top.php" instead of "jeba-index.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
No dangerous file extensions were detected3,264 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
SVG3001,673
CSS28201,335
PHP18227177
JavaScript24479

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected