Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼7.17ms] Passed 4 tests
An overview of server-side resources used by Smart PWA
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.04 | 47.67 ▲7.06 |
Dashboard /wp-admin | 3.32 ▼0.02 | 46.29 ▼13.20 |
Posts /wp-admin/edit.php | 3.37 ▲0.02 | 45.39 ▼1.51 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.02 | 77.27 ▼17.43 |
Media Library /wp-admin/upload.php | 3.24 ▲0.02 | 36.08 ▲3.47 |
Server storage [IO: ▲0.10MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 8 new options
New WordPress options |
---|
smart_pwa_queue_flush_rules |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
smart_pwa_assets_paths |
db_upgraded |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for Smart PWA
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,807 ▲61 | 14.79 ▲0.12 | 1.73 ▼0.16 | 44.32 ▲2.08 |
Dashboard /wp-admin | 2,206 ▲15 | 5.90 ▲0.00 | 110.32 ▲10.66 | 42.10 ▲0.94 |
Posts /wp-admin/edit.php | 2,092 ▼0 | 2.00 ▼0.00 | 36.48 ▲0.81 | 31.26 ▼2.05 |
Add New Post /wp-admin/post-new.php | 1,519 ▲5 | 22.80 ▲5.10 | 661.31 ▼14.70 | 53.31 ▲1.20 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.28 ▲0.02 | 96.02 ▼14.87 | 42.00 ▼8.33 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 8 options in the database
- smart_pwa_assets_paths
- smart_pwa_queue_flush_rules
- theysaidso_admin_options
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- widget_recent-comments
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected
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
The following issues need your attention
- 7× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function Smart_PWA\\register_activation_hook() in wp-content/plugins/smart-pwa/includes/class-app.php:26
- > PHP Warning
Use of undefined constant MINUTE_IN_SECONDS - assumed 'MINUTE_IN_SECONDS' (this will throw an Error in a future version of PHP) in wp-content/plugins/smart-pwa/includes/class-app.php on line 13
- > PHP Warning
A non-numeric value encountered in wp-content/plugins/smart-pwa/includes/class-app.php on line 13
- > PHP Warning
A non-numeric value encountered in wp-content/plugins/smart-pwa/includes/class-app.php on line 13
- > PHP Fatal error
Uncaught Error: Call to undefined function get_transient() in wp-content/plugins/smart-pwa/includes/js/sw.js.php:10
- > PHP Warning
Use of undefined constant MINUTE_IN_SECONDS - assumed 'MINUTE_IN_SECONDS' (this will throw an Error in a future version of PHP) in wp-content/plugins/smart-pwa/includes/class-app.php on line 13
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/smart-pwa/includes/manifest.php:9
- > 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 Passed 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: manifest, progressive web apps, web manifest, pwa
smart-pwa/smart-pwa.php Passed 13 tests
The main PHP file in "Smart PWA" ver. 0.1.6 adds more information about the plugin and also serves as the entry point for this plugin
17 characters long description:
PWA for WordPress
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
There were no executable files found in this plugin344 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 92 | 179 | 344 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.16 |
Average class complexity | 4.75 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 9.00 |
Average method complexity | 1.72 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 19 | |
▷ Static methods | 6 | 31.58% |
▷ Public methods | 19 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 3 | |
▷ Named functions | 2 | 66.67% |
▷ Anonymous functions | 1 | 33.33% |
Constants | 6 | |
▷ Global constants | 1 | 16.67% |
▷ Class constants | 5 | 83.33% |
▷ Public constants | 5 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
wp-logo.png | 82.46KB | 25.93KB | ▼ 68.56% |