Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼7.90ms] Passed 4 tests
This is a short check of server-side resources used by OneSignal - Web Push Notifications
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 35.62 ▼6.82 |
Dashboard /wp-admin | 3.33 ▼0.02 | 46.94 ▼12.35 |
Posts /wp-admin/edit.php | 3.38 ▲0.02 | 46.28 ▼3.96 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 90.44 ▼8.48 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 33.94 ▲3.29 |
Server storage [IO: ▲9.45MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 107 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-posts |
widget_onesignalwidget |
can_compress_scripts |
widget_recent-comments |
db_upgraded |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for OneSignal - Web Push Notifications
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,816 ▲29 | 13.54 ▼1.17 | 8.89 ▲6.87 | 38.72 ▼4.52 |
Dashboard /wp-admin | 2,210 ▲33 | 5.62 ▲0.04 | 93.44 ▼9.68 | 44.45 ▲0.33 |
Posts /wp-admin/edit.php | 2,123 ▲23 | 2.04 ▲0.09 | 40.07 ▲3.24 | 35.58 ▼2.68 |
Add New Post /wp-admin/post-new.php | 6,294 ▲4,765 | 26.20 ▲2.82 | 852.72 ▲193.16 | 62.14 ▲12.21 |
Media Library /wp-admin/upload.php | 1,418 ▲24 | 4.28 ▲0.09 | 93.99 ▼10.07 | 41.82 ▲0.53 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- Zombie WordPress options detected upon uninstall: 7 options
- widget_onesignalwidget
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-comments
- db_upgraded
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for 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 | 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 fix the following items
- 9× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/onesignal-free-web-push-notifications/onesignal-admin.php
- > /wp-content/plugins/onesignal-free-web-push-notifications/onesignal-utils.php
- > /wp-content/plugins/onesignal-free-web-push-notifications/sdk_files/OneSignalSDKUpdaterWorker.js.php
- > /wp-content/plugins/onesignal-free-web-push-notifications/onesignal-widget.php
- > /wp-content/plugins/onesignal-free-web-push-notifications/onesignal.php
- > /wp-content/plugins/onesignal-free-web-push-notifications/onesignal-public.php
- > /wp-content/plugins/onesignal-free-web-push-notifications/views/config.php
- > /wp-content/plugins/onesignal-free-web-push-notifications/sdk_files/OneSignalSDKWorker.js.php
- > /wp-content/plugins/onesignal-free-web-push-notifications/onesignal-settings.php
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
- Tags: You are using too many tags: 24 tag instead of maximum 10
onesignal-free-web-push-notifications/onesignal.php 92% from 13 tests
"OneSignal - Web Push Notifications" version 2.4.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("onesignal-free-web-push-notifications.php" instead of "onesignal.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin4,119 lines of code in 23 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 256 | 218 | 2,217 |
CSS | 6 | 44 | 500 | 858 |
SVG | 2 | 0 | 0 | 566 |
JavaScript | 4 | 64 | 79 | 465 |
HTML | 3 | 0 | 1 | 13 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.63 |
Average class complexity | 52.60 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 130.00 |
Average method complexity | 6.31 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 85.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 51 | |
▷ Static methods | 40 | 78.43% |
▷ Public methods | 49 | 96.08% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 3.92% |
Functions | 5 | |
▷ Named functions | 4 | 80.00% |
▷ Anonymous functions | 1 | 20.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
13 PNG files occupy 0.58MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
views/images/settings/SampleNotification.png | 4.41KB | 3.44KB | ▼ 22.09% |
views/images/settings/https-url.png | 86.63KB | 28.80KB | ▼ 66.75% |
views/images/settings/chrome-push.png | 52.85KB | 18.11KB | ▼ 65.74% |
views/images/menu_icon.png | 3.10KB | 1.46KB | ▼ 52.91% |
views/images/SampleNotification.png | 4.41KB | 3.44KB | ▼ 22.09% |