Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲0.39MB] [CPU: ▼0.99ms] Passed 4 tests
An overview of server-side resources used by Web Push
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.83 ▲0.37 | 41.03 ▼0.10 |
Dashboard /wp-admin | 3.76 ▲0.45 | 51.62 ▲7.19 |
Posts /wp-admin/edit.php | 3.80 ▲0.45 | 52.63 ▼3.67 |
Add New Post /wp-admin/post-new.php | 6.27 ▲0.38 | 100.29 ▼6.16 |
Media Library /wp-admin/upload.php | 3.61 ▲0.38 | 39.01 ▲5.96 |
Web Push /wp-admin/options-general.php?page=web-push-options | 3.61 | 37.95 |
Send a custom push notification /wp-admin/tools.php?page=web-push-tools | 3.55 | 34.64 |
Server storage [IO: ▲0.58MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 173 new files
Database: 1 new table, 20 new options
New tables |
---|
wp_webpush_subscription |
New WordPress options |
---|
webpush_gcm_key |
widget_recent-posts |
webpush_gcm_sender_id |
wpswmanager_registrations |
webpush_prompt_count |
webpush_icon |
webpush_generate_manifest |
theysaidso_admin_options |
widget_recent-comments |
webpush_triggers |
... |
Browser metrics Passed 4 tests
A check of browser resources used by Web Push
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,013 ▲278 | 13.52 ▼0.90 | 3.69 ▲2.07 | 41.07 ▼3.23 |
Dashboard /wp-admin | 2,295 ▲107 | 5.40 ▲0.50 | 126.44 ▲7.25 | 41.02 ▼7.04 |
Posts /wp-admin/edit.php | 2,109 ▲20 | 2.04 ▲0.04 | 39.72 ▼0.82 | 38.03 ▲1.92 |
Add New Post /wp-admin/post-new.php | 6,292 ▲4,764 | 19.66 ▼3.37 | 896.17 ▲302.21 | 64.43 ▲12.47 |
Media Library /wp-admin/upload.php | 1,409 ▲21 | 4.24 ▲0.03 | 97.59 ▲1.85 | 42.48 ▲0.18 |
Web Push /wp-admin/options-general.php?page=web-push-options | 1,508 | 4.15 | 64.13 | 34.81 |
Send a custom push notification /wp-admin/tools.php?page=web-push-tools | 891 | 2.20 | 25.73 | 28.62 |
Uninstaller [IO: ▲0.01MB] [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
These items require your attention
- Zombie WordPress options detected upon uninstall: 8 options
- db_upgraded
- can_compress_scripts
- widget_recent-comments
- widget_recent-posts
- webpush_generate_manifest
- widget_theysaidso_widget
- theysaidso_admin_options
- wpswmanager_registrations
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
- > GET request to /wp-admin/tools.php?page=web-push-tools
- > Notice in wp-content/plugins/web-push/wp-web-push-admin.php+567
Undefined variable: icon_url
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
- 87× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'Mdanter\\Ecc\\Crypto\\EcDH\\EcDHInterface' not found in wp-content/plugins/web-push/vendor/mdanter/ecc/src/Crypto/EcDH/EcDH.php:46
- > PHP Fatal error
Uncaught Error: Interface 'Lcobucci\\JWT\\Signer' not found in wp-content/plugins/web-push/vendor/lcobucci/jwt/src/Signer/BaseSigner.php:19
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/web-push/wp-web-push-main.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/web-push/wp-web-push.php:18
- > PHP Fatal error
Cannot use FG\\ASN1\\Object as Object because 'Object' is a special class name in wp-content/plugins/web-push/vendor/mdanter/ecc/src/Serializer/PublicKey/Der/Parser.php on line 5
- > PHP Fatal error
Uncaught Error: Class 'FG\\ASN1\\Construct' not found in wp-content/plugins/web-push/vendor/fgrosse/phpasn1/lib/ASN1/UnknownConstructedObject.php:13
- > PHP Fatal error
Uncaught Error: Interface 'Mdanter\\Ecc\\Serializer\\Point\\PointSerializerInterface' not found in wp-content/plugins/web-push/vendor/mdanter/ecc/src/Serializer/Point/UncompressedPointSerializer.php:10
- > PHP Fatal error
Uncaught Error: Interface 'Mdanter\\Ecc\\File\\FileLoader' not found in wp-content/plugins/web-push/vendor/mdanter/ecc/src/File/DerFileLoader.php:5
- > PHP Fatal error
Uncaught Error: Class 'FG\\ASN1\\AbstractString' not found in wp-content/plugins/web-push/vendor/fgrosse/phpasn1/lib/ASN1/Universal/NumericString.php:16
- > PHP Fatal error
Uncaught Error: Class 'FG\\ASN1\\AbstractString' not found in wp-content/plugins/web-push/vendor/fgrosse/phpasn1/lib/ASN1/Universal/BMPString.php:16
- > 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 96% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: push notifications, notifications, mobile notifications, web push, desktop notifications...
web-push/wp-web-push.php 92% from 13 tests
This is the main PHP file of "Web Push" version 1.4.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("web-push.php" instead of "wp-web-push.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected9,139 lines of code in 169 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 156 | 2,115 | 4,602 | 8,314 |
JavaScript | 8 | 111 | 30 | 634 |
CSS | 2 | 22 | 0 | 155 |
SVG | 3 | 0 | 1 | 36 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
Average class complexity | 6.23 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 97.00 |
Average method complexity | 2.07 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 51.00 |
Code structure | ||
---|---|---|
Namespaces | 34 | |
Interfaces | 17 | |
Traits | 0 | |
Classes | 133 | |
▷ Abstract classes | 8 | 6.02% |
▷ Concrete classes | 125 | 93.98% |
▷ Final classes | 2 | 1.60% |
Methods | 829 | |
▷ Static methods | 116 | 13.99% |
▷ Public methods | 712 | 85.89% |
▷ Protected methods | 66 | 7.96% |
▷ Private methods | 51 | 6.15% |
Functions | 6 | |
▷ Named functions | 1 | 16.67% |
▷ Anonymous functions | 5 | 83.33% |
Constants | 109 | |
▷ Global constants | 3 | 2.75% |
▷ Class constants | 106 | 97.25% |
▷ Public constants | 106 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
lib/placeholder.png | 17.97KB | 9.60KB | ▼ 46.57% |