Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
- Install procedure validation failed for this plugin
- > Warning in wp-admin/includes/class-wp-filesystem-direct.php+545
mkdir(): File exists
Server metrics [RAM: ▲0.23MB] [CPU: ▼295.53ms] Passed 4 tests
A check of server-side resources used by Add To Home Screen
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.75 ▲0.23 | 57.51 ▲2.20 |
Dashboard /wp-admin | 3.63 ▲0.23 | 34.23 ▲0.96 |
Posts /wp-admin/edit.php | 3.92 ▲0.28 | 37.80 ▼3.54 |
Add New Post /wp-admin/post-new.php | 7.16 ▲0.19 | 94.23 ▼1,181.73 |
Media Library /wp-admin/upload.php | 3.58 ▲0.29 | 27.13 ▲3.27 |
Add to Home Screen /wp-admin/options-general.php?page=add-to-homescreen-options | 3.57 | 28.23 |
Server storage [IO: ▲0.80MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 65 new files
Database: no new tables, 2 new options
New WordPress options |
---|
webappmanifest_content |
wpswmanager_registrations |
Browser metrics Passed 4 tests
An overview of browser requirements for Add To Home Screen
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,857 ▲113 | 16.46 ▲0.79 | 8.46 ▲1.65 | 2.19 ▼0.01 |
Dashboard /wp-admin | 2,965 ▲104 | 6.02 ▼0.15 | 118.41 ▼39.46 | 155.64 ▼9.25 |
Posts /wp-admin/edit.php | 2,693 ▲8 | 3.23 ▼0.14 | 64.00 ▼2.12 | 141.75 ▼5.52 |
Add New Post /wp-admin/post-new.php | 1,755 ▲90 | 21.01 ▲1.54 | 429.25 ▲14.79 | 155.24 ▼3.80 |
Media Library /wp-admin/upload.php | 1,703 ▲5 | 5.53 ▲0.01 | 142.16 ▼0.13 | 187.62 ▼1.06 |
Add to Home Screen /wp-admin/options-general.php?page=add-to-homescreen-options | 1,570 | 5.33 | 84.60 | 146.98 |
Uninstaller [IO: ▲0.01MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- This plugin cannot be uninstalled
- > Warning in wp-admin/includes/class-wp-filesystem-direct.php+545
mkdir(): File exists
- This plugin did not uninstall successfully, leaving 2 options in the database
- webappmanifest_content
- wpswmanager_registrations
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
- 5× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/add-to-home-screen/class-wp-add-to-homescreen-admin.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/add-to-home-screen/wp-add-to-homescreen.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/add-to-home-screen/lib/pages/admin.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/add-to-home-screen/class-wp-add-to-homescreen-plugin.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/add-to-home-screen/class-wp-add-to-homescreen-stats.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: applications, progressive, web, banner, progressive web applications...
add-to-home-screen/wp-add-to-homescreen.php 85% from 13 tests
"Add To Home Screen" version 0.3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("add-to-home-screen.php" instead of "wp-add-to-homescreen.php")
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected7,771 lines of code in 53 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 18 | 1,211 | 1,111 | 5,650 |
PHP | 18 | 233 | 248 | 1,059 |
Markdown | 5 | 201 | 0 | 466 |
JSON | 9 | 1 | 0 | 350 |
SVG | 1 | 1 | 1 | 133 |
CSS | 1 | 20 | 0 | 108 |
Bourne Shell | 1 | 0 | 0 | 5 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 9.82 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 39.00 |
Average method complexity | 1.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 11 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 11 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 102 | |
▷ Static methods | 13 | 12.75% |
▷ Public methods | 80 | 78.43% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 22 | 21.57% |
Functions | 3 | |
▷ Named functions | 1 | 33.33% |
▷ Anonymous functions | 2 | 66.67% |
Constants | 6 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 6 | 100.00% |
▷ Public constants | 6 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.33MB with 0.22MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
lib/imgs/rocket.png | 15.06KB | 5.73KB | ▼ 61.96% |
lib/imgs/android.png | 321.16KB | 96.87KB | ▼ 69.84% |