Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.42MB] [CPU: ▼140.70ms] Passed 4 tests
Analyzing server-side resources used by Back to Top Button
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.22 ▲0.50 | 38.50 ▲14.83 |
Dashboard /wp-admin | 3.51 ▲0.45 | 49.58 ▼0.12 |
Posts /wp-admin/edit.php | 3.58 ▲0.47 | 55.33 ▲8.57 |
Add New Post /wp-admin/post-new.php | 5.80 ▲0.37 | 95.41 ▼569.89 |
Media Library /wp-admin/upload.php | 3.39 ▲0.38 | 33.01 ▼1.36 |
Server storage [IO: ▲1.54MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 190 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
This is an overview of browser requirements for Back to Top Button
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 4,020 ▲424 | 18.03 ▲2.43 | 10.88 ▲4.72 | 49.15 ▼4.11 |
Dashboard /wp-admin | 3,177 ▲243 | 7.88 ▲1.93 | 164.01 ▲14.76 | 135.30 ▲21.16 |
Posts /wp-admin/edit.php | 3,009 ▲270 | 4.25 ▲1.56 | 87.83 ▲2.69 | 120.96 ▲28.47 |
Add New Post /wp-admin/post-new.php | 1,703 ▲20 | 18.98 ▲0.30 | 370.84 ▼29.45 | 134.26 ▲17.59 |
Media Library /wp-admin/upload.php | 1,778 ▼29 | 4.79 ▼0.26 | 124.66 ▼38.75 | 148.92 ▲22.51 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables
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
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
- 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/back-to-top-button/back-to-top.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 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
Attributes that need to be fixed:
- Tags: There are too many tags (23 tag instead of maximum 10)
back-to-top-button/back-to-top.php 92% from 13 tests
The main PHP file in "Back to Top Button" ver. 1.5 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("back-to-top-button.php" instead of "back-to-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
There were no executable files found in this plugin2,128 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 250 | 25 | 1,262 |
SVG | 1 | 0 | 0 | 655 |
CSS | 2 | 17 | 3 | 92 |
PO File | 1 | 31 | 32 | 81 |
JavaScript | 1 | 10 | 0 | 38 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.22 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 21 | |
▷ Named functions | 21 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
176 PNG files occupy 0.61MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/83btb.png | 5.53KB | 2.67KB | ▼ 51.69% |
images/55btb.png | 4.51KB | 2.31KB | ▼ 48.89% |
images/168btb.png | 3.36KB | 2.15KB | ▼ 35.80% |
images/146btb.png | 2.91KB | 2.03KB | ▼ 30.33% |
images/35btb.png | 1.91KB | 1.70KB | ▼ 11.02% |