84% xl-scroll-to-top

Code Review | XL Scroll To Top

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

About plugin

  • Plugin page: xl-scroll-to-top
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.9.4
  • WordPress version: 6.3.1
  • First release: Oct 9, 2015
  • Latest release: Mar 10, 2018
  • Number of updates: 4
  • Update frequency: every 220.8 days
  • Top authors: xltheme (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /852 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by XL Scroll To Top
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.94 ▼2.79
Dashboard /wp-admin3.31 ▲0.0152.57 ▲7.93
Posts /wp-admin/edit.php3.36 ▲0.0048.41 ▼0.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.51 ▼4.30
Media Library /wp-admin/upload.php3.23 ▲0.0038.07 ▲4.50

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

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

Browser metrics Passed 4 tests

XL Scroll To Top: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲20513.69 ▼0.715.67 ▲4.0339.77 ▼5.02
Dashboard /wp-admin2,221 ▲304.88 ▼1.0299.70 ▼5.1139.32 ▼5.13
Posts /wp-admin/edit.php2,101 ▲122.03 ▲0.0336.82 ▼6.4131.32 ▼5.73
Add New Post /wp-admin/post-new.php1,525 ▼323.27 ▲4.77627.85 ▼22.4441.93 ▼13.11
Media Library /wp-admin/upload.php1,403 ▲154.28 ▲0.0699.03 ▲0.4144.43 ▲1.07

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xl-scroll-to-top/functions.php:19

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 93% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Screenshot 1) image missing
You can look at the official readme.txt

xl-scroll-to-top/functions.php 92% from 13 tests

"XL Scroll To Top" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("xl-scroll-to-top.php" instead of "functions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected698 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
SVG100640
CSS23331
JavaScript23919
PHP1488

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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
screenshot-1.png59.24KB19.00KB▼ 67.93%