Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼4.73ms] Passed 4 tests
Analyzing server-side resources used by PWA for WordPress
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.40 ▼0.07 | 29.02 ▼15.66 |
Dashboard /wp-admin | 3.35 ▲0.05 | 57.78 ▲7.43 |
Posts /wp-admin/edit.php | 3.47 ▲0.11 | 56.77 ▼1.29 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 91.13 ▼6.65 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 40.55 ▲4.68 |
Server storage [IO: ▲0.24MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: no new tables, 10 new options
New WordPress options |
---|
db_upgraded |
pwa4wp_sw_installation_switch |
can_compress_scripts |
widget_recent-posts |
widget_recent-comments |
pwa4wp_sw_version |
theysaidso_admin_options |
pwa4wp_defer_install |
widget_theysaidso_widget |
pwa4wp_multisite_unify |
Browser metrics Passed 4 tests
Checking browser requirements for PWA for WordPress
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,995 ▲234 | 14.87 ▲0.62 | 2.46 ▲0.55 | 43.13 ▲4.43 |
Dashboard /wp-admin | 2,397 ▲220 | 6.62 ▲1.05 | 114.56 ▲20.70 | 38.37 ▼2.91 |
Posts /wp-admin/edit.php | 2,328 ▲228 | 3.79 ▲1.80 | 57.80 ▲19.27 | 33.89 ▼2.73 |
Add New Post /wp-admin/post-new.php | 1,574 ▲46 | 23.50 ▲0.57 | 672.50 ▲8.19 | 37.09 ▼19.64 |
Media Library /wp-admin/upload.php | 1,465 ▲65 | 4.50 ▲0.27 | 97.69 ▼11.55 | 48.47 ▲1.67 |
Manifest /wp-admin/admin.php?page=PWA for WordPress?1 | 1,594 | 3.59 | 77.36 | 74.33 |
PWA for WordPress /wp-admin/admin.php?page=PWA for WordPress | 1,282 | 3.63 | 44.39 | 63.37 |
ServiceWorker /wp-admin/admin.php?page=PWA for WordPress?2 | 1,499 | 3.82 | 46.99 | 27.83 |
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 10 options in the database
- can_compress_scripts
- pwa4wp_multisite_unify
- widget_recent-posts
- pwa4wp_sw_installation_switch
- pwa4wp_sw_version
- db_upgraded
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- pwa4wp_defer_install
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/pwa4wp/public/partials/pwa4wp-public-display.php
- 21× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function update_option() in wp-content/plugins/pwa4wp/admin/partials/pwa4wp-admin-display.php:21
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/pwa4wp/admin/partials/pwa4wp-admin-sw.php:23
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/pwa4wp/admin/partials/pwa4wp-admin-manifest.php on line 15
- > PHP Warning
Use of undefined constant PWA4WP_MANIFEST_FILE - assumed 'PWA4WP_MANIFEST_FILE' (this will throw an Error in a future version of PHP) in wp-content/plugins/pwa4wp/admin/partials/pwa4wp-admin-display.php on line 17
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/pwa4wp/admin/partials/pwa4wp-admin-manifest.php on line 17
- > PHP Notice
Undefined variable: data in wp-content/plugins/pwa4wp/admin/partials/pwa4wp-admin-sw.php on line 17
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/pwa4wp/admin/partials/pwa4wp-admin-sw.php on line 17
- > PHP Notice
Undefined variable: data in wp-content/plugins/pwa4wp/admin/partials/pwa4wp-admin-sw.php on line 16
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/pwa4wp/admin/partials/pwa4wp-admin-sw.php on line 15
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/pwa4wp/admin/partials/pwa4wp-admin-sw.php on line 16
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 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
8 plugin tags: cache, pwa, offline, progressive web apps, mobile...
pwa4wp/pwa4wp.php Passed 13 tests
Analyzing the main PHP file in "PWA for WordPress" version 1.2.0
45 characters long description:
Provides transformation for WordPress to PWA.
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 plugin2,495 lines of code in 27 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 18 | 178 | 557 | 1,646 |
JavaScript | 5 | 29 | 55 | 364 |
PO File | 1 | 120 | 158 | 328 |
CSS | 2 | 3 | 8 | 116 |
Markdown | 1 | 19 | 0 | 41 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 9.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 56.00 |
Average method complexity | 2.39 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 12.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 10 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 10 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 43 | |
▷ Static methods | 2 | 4.65% |
▷ Public methods | 34 | 79.07% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 9 | 20.93% |
Functions | 13 | |
▷ Named functions | 3 | 23.08% |
▷ Anonymous functions | 10 | 76.92% |
Constants | 5 | |
▷ Global constants | 5 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/assets/images/green-35.png | 0.50KB | 0.31KB | ▼ 37.99% |
public/assets/images/red-35.png | 0.49KB | 0.33KB | ▼ 31.54% |
public/img/no_img.png | 11.48KB | 5.33KB | ▼ 53.52% |
public/assets/images/green-35.png | 0.50KB | 0.31KB | ▼ 37.99% |
admin/assets/images/red-35.png | 0.49KB | 0.33KB | ▼ 31.54% |