94% x-scroll-to-top-responsive

Code Review | X-Scroll To Top - Responsive

WordPress plugin X-Scroll To Top - Responsive scored 94% from 54 tests.

About plugin

  • Plugin page: x-scroll-to-top-r...
  • Plugin version: 3.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 5.8.1
  • First release: Jul 10, 2014
  • Latest release: Feb 4, 2020
  • Number of updates: 54
  • Update frequency: every 37.7 days
  • Top authors: Md. Jahidul Islam (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active / 8,219 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼134.25ms] Passed 4 tests

Server-side resources used by X-Scroll To Top - Responsive
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.80 ▲0.0822.76 ▲2.35
Dashboard /wp-admin3.13 ▲0.0839.57 ▲0.88
Posts /wp-admin/edit.php3.18 ▲0.0843.70 ▼0.12
Add New Post /wp-admin/post-new.php5.49 ▲0.0693.34 ▼540.11
Media Library /wp-admin/upload.php3.07 ▲0.0737.81 ▲4.72

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by X-Scroll To Top - Responsive
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,828 ▲23316.31 ▲0.7514.49 ▲5.3163.24 ▲16.61
Dashboard /wp-admin2,973 ▲426.04 ▼0.03143.18 ▼7.99103.87 ▼16.82
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0260.49 ▼4.3585.47 ▼2.07
Add New Post /wp-admin/post-new.php1,683 ▲6818.80 ▼2.56431.75 ▲142.45103.38 ▲4.14
Media Library /wp-admin/upload.php1,810 ▲35.04 ▼0.02151.10 ▼12.12112.38 ▼1.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/x-scroll-to-top-responsive/inc/class-XSTR-custom-customizer.php:25

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

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: scroll up button, scroll button, free scroll to top, responsive, scroll up...

x-scroll-to-top-responsive/plugin-hook.php 92% from 13 tests

The main PHP file in "X-Scroll To Top - Responsive" ver. 3.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("x-scroll-to-top-responsive.php" instead of "plugin-hook.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin713 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP10154290354
CSS34125249
JavaScript3223984
SVG114026

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.09
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods14
▷ Static methods535.71%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin