Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
- This plugin did not install gracefully
- > Warning in wp-admin/includes/class-wp-filesystem-direct.php+558
mkdir(): File exists
Server metrics [RAM: ▲0.06MB] [CPU: ▼0.17ms] Passed 4 tests
This is a short check of server-side resources used by Add To Home Screen
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.08 | 37.01 ▼4.57 |
Dashboard /wp-admin | 3.36 ▲0.06 | 48.07 ▼0.41 |
Posts /wp-admin/edit.php | 3.47 ▲0.12 | 51.79 ▲2.45 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.05 | 95.20 ▲6.85 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 35.10 ▲1.84 |
Add to Home Screen /wp-admin/options-general.php?page=add-to-homescreen-options | 3.29 | 42.16 |
Server storage [IO: ▲0.80MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 65 new files
Database: no new tables, 8 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
wpswmanager_registrations |
widget_theysaidso_widget |
webappmanifest_content |
Browser metrics Passed 4 tests
A check of browser resources used by Add To Home Screen
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,869 ▲112 | 13.61 ▼0.78 | 3.67 ▲1.54 | 39.62 ▼2.53 |
Dashboard /wp-admin | 2,255 ▲63 | 4.82 ▼0.12 | 111.37 ▼0.78 | 40.13 ▼2.60 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 1.99 ▼0.04 | 39.12 ▼0.18 | 34.26 ▼0.68 |
Add New Post /wp-admin/post-new.php | 1,524 ▲10 | 23.16 ▲5.63 | 595.78 ▼93.36 | 49.95 ▲5.36 |
Media Library /wp-admin/upload.php | 1,395 ▲7 | 4.27 ▲0.10 | 93.88 ▼7.98 | 40.71 ▼5.32 |
Add to Home Screen /wp-admin/options-general.php?page=add-to-homescreen-options | 1,161 | 3.75 | 56.72 | 72.96 |
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+558
mkdir(): File exists
- The uninstall procedure has failed, leaving 8 options in the database
- can_compress_scripts
- webappmanifest_content
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
- wpswmanager_registrations
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
- 5× PHP files trigger errors when accessed directly with GET requests:
- > 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 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/class-wp-add-to-homescreen-plugin.php:3
- > 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-stats.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: homescreen, applications, banner, web, progressive web applications...
add-to-home-screen/wp-add-to-homescreen.php 85% from 13 tests
The principal PHP file in "Add To Home Screen" v. 0.3.1 is loaded by WordPress automatically on each request
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("add-to-home-screen.php" instead of "wp-add-to-homescreen.php")
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin7,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
A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
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
Often times overlooked, PNG files can occupy unnecessary space in 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% |