83% wc-live-sale-notifications

Code Review | WooCommerce Sales Notifications - Recent Sales Popup

WordPress plugin WooCommerce Sales Notifications - Recent Sales Popup scored83%from 54 tests.

About plugin

  • Plugin page: wc-live-sale-noti...
  • Plugin version: 2.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 18, 2021
  • Latest release: Aug 11, 2023
  • Number of updates: 14
  • Update frequency: every 56.8 days
  • Top authors: xfinitysoft (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /970 total downloads

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.20MB] [CPU: ▼3.77ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Sales Notifications - Recent Sales Popup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2337.85 ▼4.47
Dashboard /wp-admin3.50 ▲0.2047.14 ▼2.57
Posts /wp-admin/edit.php3.55 ▲0.2047.18 ▲0.84
Add New Post /wp-admin/post-new.php6.10 ▲0.2286.75 ▼8.86
Media Library /wp-admin/upload.php3.43 ▲0.2036.04 ▲3.95
Woo Live Sale Notification /wp-admin/admin.php?page=woocommerce_live_sale3.3932.06
Support /wp-admin/admin.php?page=xslsn-support3.3932.61

Server storage [IO: ▲0.44MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 41 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
xslsn-live-sale-notification

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Sales Notifications - Recent Sales Popup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,121 ▲37513.89 ▼0.468.65 ▲6.7538.85 ▼8.81
Dashboard /wp-admin2,237 ▲465.14 ▲0.24115.97 ▲4.7140.24 ▼7.10
Posts /wp-admin/edit.php2,120 ▲312.31 ▲0.3239.88 ▲0.4238.05 ▲3.60
Add New Post /wp-admin/post-new.php1,541 ▲2223.57 ▲0.26659.28 ▼8.8161.17 ▲9.45
Media Library /wp-admin/upload.php1,419 ▲314.50 ▲0.3298.96 ▲0.8242.80 ▼0.18
Woo Live Sale Notification /wp-admin/admin.php?page=woocommerce_live_sale7901.9024.4524.63
Support /wp-admin/admin.php?page=xslsn-support7901.9025.4623.41

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • xslsn-live-sale-notification

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-live-sale-notifications/xslsn-includes/xslsn-message-tab.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-live-sale-notifications/xslsn-includes/xslsn-general-tab.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wc-live-sale-notifications/xs-live-sales-notifications.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-live-sale-notifications/xslsn-includes/xslsn-support.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-live-sale-notifications/xslsn-includes/xslsn-products-tab.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-live-sale-notifications/xslsn-includes/xslsn-time-tab.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-live-sale-notifications/xslsn-includes/xslsn-frontendpopup.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-live-sale-notifications/xslsn-includes/xslsn-assign-tab.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-live-sale-notifications/xslsn-includes/xslsn-productsdetails-tab.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-live-sale-notifications/xslsn-includes/xslsn-design-tab.php:7

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

wc-live-sale-notifications/xs-live-sales-notifications.php 85% from 13 tests

The primary PHP file in "WooCommerce Sales Notifications - Recent Sales Popup" version 2.0.4 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wc-live-sale-notifications.php" instead of "xs-live-sales-notifications.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "4.4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin3,682 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP121941722,420
JavaScript33637652
CSS29735609
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
xslsn-assets/xslsn-img/xslsn_style6.png5.99KB1.91KB▼ 68.15%
xslsn-assets/xslsn-img/xslsn_style8.png6.62KB2.14KB▼ 67.71%
xslsn-assets/xslsn-img/xslsn_style12.png15.25KB7.48KB▼ 50.92%
xslsn-assets/xslsn-img/xslsn_style1.png11.78KB4.77KB▼ 59.55%
xslsn-assets/xslsn-img/pink.png9.25KB8.73KB▼ 5.63%