Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.02MB] [CPU: ▼3.37ms] Passed 4 tests
This is a short check of server-side resources used by Back To Top
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.02 | 43.50 ▲0.59 |
Dashboard /wp-admin | 3.37 ▲0.02 | 48.47 ▼7.00 |
Posts /wp-admin/edit.php | 3.48 ▲0.08 | 52.35 ▼0.46 |
Add New Post /wp-admin/post-new.php | 5.95 ▲0.02 | 93.41 ▼6.20 |
Media Library /wp-admin/upload.php | 3.29 ▲0.02 | 39.54 ▲0.18 |
Settings /wp-admin/admin.php?page=backtop-settings | 3.26 | 30.95 |
Back To Top /wp-admin/admin.php?page=backtotop | 3.31 | 34.06 |
Server storage [IO: ▲0.82MB] [DB: ▲0.00MB] 67% from 3 tests
Input-output and database impact of this plugin
Please try to fix the following items
- Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/backtotop/" and "wp-content/uploads/"
- (new file) "wp-content/plugins/backtotop/banner-772\303\227250.png"
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for Back To Top
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,897 ▲136 | 13.44 ▼0.91 | 8.92 ▲7.13 | 43.43 ▲0.61 |
Dashboard /wp-admin | 2,224 ▲50 | 5.56 ▲0.02 | 86.82 ▼1.64 | 72.46 ▲31.17 |
Posts /wp-admin/edit.php | 2,132 ▲32 | 2.01 ▲0.00 | 38.33 ▼0.62 | 34.00 ▼2.20 |
Add New Post /wp-admin/post-new.php | 1,548 ▲22 | 23.47 ▼0.07 | 684.00 ▲8.87 | 51.31 ▼2.50 |
Media Library /wp-admin/upload.php | 1,423 ▲23 | 4.20 ▼0.02 | 100.74 ▼16.39 | 74.07 ▲27.08 |
Settings /wp-admin/admin.php?page=backtop-settings | 841 | 2.01 | 27.90 | 25.10 |
Back To Top /wp-admin/admin.php?page=backtotop | 860 | 2.03 | 24.30 | 26.82 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-posts
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
Everything seems fine, however this is by no means an exhaustive test
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
Please take a closer look at the following
- 4× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/backtotop/inc/btt_backend.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/backtotop/inc/btt_settings.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_menu_page() in wp-content/plugins/backtotop/inc/btt_backend_functions.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/backtotop/backtotop.php:15
- > PHP Fatal error
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)
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: backtotop, scrolltotop, smooth scroll to top, top
backtotop/backtotop.php Passed 13 tests
"Back To Top" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
119 characters long description:
This plugin will create a "back to top" or "scroll to top button" for your website with smooth scrolling and 25 images.
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
There were no executable files found in this plugin305 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 73 | 15 | 302 |
JavaScript | 3 | 0 | 0 | 3 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 7.00 |
▷ Minimum class complexity | 7.00 |
▷ Maximum class complexity | 7.00 |
Average method complexity | 2.20 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 5 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 5 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 0% from 2 tests
Image compression 0% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
27 PNG files occupy 0.55MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
(invalid) img/8.png | 7.47KB | 0.00KB | ▼ 100.00% |
img/19.png | 10.98KB | 10.60KB | ▼ 3.47% |
img/20.png | 25.91KB | 8.22KB | ▼ 68.27% |
img/6.png | 1.36KB | 0.41KB | ▼ 70.04% |
img/1.png | 2.00KB | 0.57KB | ▼ 71.31% |