83% my-scroll-to-up

Code Review | WP Scroll To Up

WordPress plugin WP Scroll To Up scored83%from 54 tests.

About plugin

  • Plugin page: my-scroll-to-up
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0.1
  • WordPress version: 6.3.1
  • First release: Nov 11, 2015
  • Latest release: Dec 12, 2016
  • Number of updates: 3
  • Update frequency: every 132.7 days
  • Top authors: Sohelwpexpert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /584 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

This is a short check of server-side resources used by WP Scroll To Up
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0627.70 ▼10.13
Dashboard /wp-admin3.33 ▲0.0348.13 ▼1.29
Posts /wp-admin/edit.php3.38 ▲0.0350.59 ▼1.30
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.88 ▼16.35
Media Library /wp-admin/upload.php3.25 ▲0.0239.86 ▲7.44
Scroll To Up settings /wp-admin/options-general.php?page=scrolltop-settings3.2232.77

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

WP Scroll To Up: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲12213.62 ▼0.749.41 ▲7.5139.97 ▼2.20
Dashboard /wp-admin2,223 ▲465.74 ▲0.1690.56 ▼0.8338.70 ▼3.80
Posts /wp-admin/edit.php2,130 ▲272.30 ▲0.2641.34 ▲1.3235.50 ▼0.68
Add New Post /wp-admin/post-new.php1,546 ▲623.37 ▲0.50667.03 ▲15.4736.25 ▼17.31
Media Library /wp-admin/upload.php1,425 ▲284.47 ▲0.2797.35 ▼9.3943.86 ▼2.52
Scroll To Up settings /wp-admin/options-general.php?page=scrolltop-settings1,3142.5862.8928.10

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/my-scroll-to-up/jeba-index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: ""
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

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

The main PHP file in "WP Scroll To Up" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("my-scroll-to-up.php" instead of "jeba-index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin2,385 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
SVG3001,673
CSS170576
PHP18319126
JavaScript28110

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected