Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲1.80MB] [CPU: ▲10.08ms] 75% from 4 tests
A check of server-side resources used by Recent Sales Notifications for WooCommerce
Please take the time to fix the following items
- CPU: Try to keep total CPU usage under 500.00ms (currently 1,098.68ms on /wp-admin/admin.php?page=wns-notifications&tab=overview)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 5.12 ▲1.66 | 77.61 ▲40.88 |
Dashboard /wp-admin | 5.18 ▲1.83 | 67.01 ▲6.93 |
Posts /wp-admin/edit.php | 5.24 ▲1.89 | 64.37 ▲13.94 |
Add New Post /wp-admin/post-new.php | 7.71 ▲1.82 | 111.68 ▲2.31 |
Media Library /wp-admin/upload.php | 5.18 ▲1.95 | 52.82 ▲17.13 |
Overview /wp-admin/admin.php?page=wns-notifications&tab=overview | 5.51 | 1,098.68 |
/wp-admin/admin.php?page=wns-notifications | 5.22 | 65.24 |
Settings /wp-admin/admin.php?page=wns-notifications&tab=settings | 5.22 | 49.33 |
Show All Notifications /wp-admin/admin.php?page=wns-notifications&tab=woonotifications | 5.22 | 46.62 |
Server storage [IO: ▲7.18MB] [DB: ▲0.01MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 444 new files
Database: 5 new tables, 12 new options
New tables |
---|
wp_wns_usage_stat |
wp_wns_notifications |
wp_wns_modules_type |
wp_wns_modules |
wp_wns_notifications_templates |
New WordPress options |
---|
wp_wns_db_installed |
can_compress_scripts |
db_upgraded |
widget_wnswoonotificationswidget |
wp_wns_db_version |
widget_theysaidso_widget |
wns_opts_data |
theysaidso_admin_options |
wns_plugin_activation_errors |
wns_plug_was_used |
... |
Browser metrics Passed 4 tests
Recent Sales Notifications for WooCommerce: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,000 ▲239 | 14.15 ▼0.21 | 10.52 ▲8.84 | 43.14 ▼2.21 |
Dashboard /wp-admin | 2,253 ▲79 | 5.44 ▼0.22 | 92.96 ▲0.87 | 43.79 ▲3.07 |
Posts /wp-admin/edit.php | 2,158 ▲58 | 2.59 ▲0.57 | 34.19 ▼5.89 | 32.59 ▼4.55 |
Add New Post /wp-admin/post-new.php | 1,585 ▲59 | 18.95 ▼4.68 | 634.28 ▲17.24 | 44.33 ▼9.11 |
Media Library /wp-admin/upload.php | 1,465 ▲68 | 4.99 ▲0.84 | 106.11 ▼1.47 | 44.31 ▼3.06 |
Overview /wp-admin/admin.php?page=wns-notifications&tab=overview | 1,940 | 10.99 | 307.86 | 34.10 |
/wp-admin/admin.php?page=wns-notifications | 1,698 | 5.78 | 101.84 | 89.76 |
Settings /wp-admin/admin.php?page=wns-notifications&tab=settings | 1,270 | 4.77 | 70.04 | 24.84 |
Show All Notifications /wp-admin/admin.php?page=wns-notifications&tab=woonotifications | 1,695 | 5.71 | 97.39 | 34.91 |
Add New Notification /wp-admin/admin.php?page=wns-notifications&tab=woonotifications#wnsadd | 1,721 | 4.97 | 109.61 | 38.32 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- The uninstall procedure failed, leaving 2 tables in the database
- wp_wns_notifications_templates
- wp_wns_notifications
- This plugin did not uninstall successfully, leaving 10 options in the database
- wns_plugin_activation_errors
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-comments
- wns_opts_data
- widget_theysaidso_widget
- wns_plug_was_used
- widget_wnswoonotificationswidget
- widget_recent-posts
- db_upgraded
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
- 12 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=wns-notifications&tab=woonotifications
- > User notice in wp-includes/functions.php+5905
Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
SRP 0% 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
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/woo-notification-and-alerts/modules/woonotifications_widgets/views/tpl/widget.php
- 87× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/woo-notification-and-alerts/modules/promo/views/tpl/layeredStylePromo.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-notification-and-alerts/modules/woonotifications/views/tpl/woonotificationsNavTabABSettings.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-notification-and-alerts/modules/options/views/tpl/optionsSettingsTabContent.php:3
- > PHP Fatal error
Uncaught Error: Class 'viewWns' not found in wp-content/plugins/woo-notification-and-alerts/modules/mail/views/mail.php:2
- > PHP Fatal error
Uncaught Error: Class 'controllerWns' not found in wp-content/plugins/woo-notification-and-alerts/modules/promo/controller.php:2
- > PHP Fatal error
Uncaught Error: Class 'baseObjectWns' not found in wp-content/plugins/woo-notification-and-alerts/classes/module.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-notification-and-alerts/modules/promo/views/tpl/adminFooter.php:4
- > PHP Fatal error
Uncaught Error: Class 'controllerWns' not found in wp-content/plugins/woo-notification-and-alerts/modules/mail/controller.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-notification-and-alerts/modules/woonotifications/views/tpl/woonotificationsNavTabContent.php:1
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/woo-notification-and-alerts/modules/woonotifications/views/tpl/showAdminNotice.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
Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: live sales feed, woocommerce notifications, woocommerce, popup, coupon...
woo-notification-and-alerts/wns.php 85% from 13 tests
Analyzing the main PHP file in "Recent Sales Notifications for WooCommerce" version 1.1.6
The following require your attention:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-notification-and-alerts.php" instead of "wns.php")
- Requires at least: The required version number did not match the one declared in readme.txt ("3.3" instead of "3.4.0")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected38,533 lines of code in 271 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 121 | 997 | 3,375 | 17,817 |
JavaScript | 106 | 982 | 2,357 | 12,089 |
CSS | 42 | 470 | 298 | 5,016 |
SVG | 1 | 0 | 0 | 2,671 |
PO File | 1 | 367 | 424 | 940 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.48 |
Average class complexity | 25.61 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 194.00 |
Average method complexity | 3.16 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 77.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 82 | |
▷ Abstract classes | 9 | 10.98% |
▷ Concrete classes | 73 | 89.02% |
▷ Final classes | 0 | 0.00% |
Methods | 935 | |
▷ Static methods | 262 | 28.02% |
▷ Public methods | 837 | 89.52% |
▷ Protected methods | 74 | 7.91% |
▷ Private methods | 24 | 2.57% |
Functions | 30 | |
▷ Named functions | 29 | 96.67% |
▷ Anonymous functions | 1 | 3.33% |
Constants | 87 | |
▷ Global constants | 62 | 71.26% |
▷ Class constants | 25 | 28.74% |
▷ Public constants | 25 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
67 PNG files occupy 0.64MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
css/images/ui-icons_666666_256x240.png | 6.82KB | 4.17KB | ▼ 38.82% |
modules/woonotifications/img/assets/close_btns/close-orange.png | 2.00KB | 1.36KB | ▼ 32.10% |
modules/woonotifications/img/ad/price_skin_big.png | 45.91KB | 14.84KB | ▼ 67.67% |
modules/woonotifications/img/assets/close_btns/lists_black.png | 0.88KB | 0.53KB | ▼ 39.76% |
modules/woonotifications/img/skin1.png | 2.61KB | 1.43KB | ▼ 45.34% |