77% live-sales-notifications-for-woocommerce

Code Review | Live sales notification for WooCommerce, Fake sales notification for WooCommerce, Recent sales popup for WooCommerce

WordPress plugin Live sales notification for WooCommerce, Fake sales notification for WooCommerce, Recent sales popup for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: live-sales-notifi...
  • Plugin version: 2.2.42
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.0
  • WordPress version: 6.3.1
  • First release: Apr 5, 2019
  • Latest release: Oct 30, 2023
  • Number of updates: 243
  • Update frequency: every 6.9 days
  • Top authors: rajeshsingh520 (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

100,000+ active /88,780 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.98ms] Passed 4 tests

A check of server-side resources used by Live sales notification for WooCommerce, Fake sales notification for WooCommerce, Recent sales popup for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.35 ▲2.59
Dashboard /wp-admin3.31 ▲0.0042.59 ▼5.52
Posts /wp-admin/edit.php3.36 ▲0.0040.78 ▼6.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.99 ▼17.20
Media Library /wp-admin/upload.php3.23 ▲0.0033.46 ▼3.12

Server storage [IO: ▲2.70MB] [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: 63 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Live sales notification for WooCommerce, Fake sales notification for WooCommerce, Recent sales popup for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.401.69 ▲0.0442.91 ▲1.70
Dashboard /wp-admin2,198 ▲215.57 ▲0.0486.93 ▼1.4338.49 ▼1.67
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0035.42 ▼1.7032.83 ▼4.12
Add New Post /wp-admin/post-new.php1,533 ▲523.05 ▼0.00647.48 ▼22.8254.67 ▼3.38
Media Library /wp-admin/upload.php1,400 ▼04.11 ▼0.1797.82 ▼13.3941.61 ▼6.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/live-sales-notifications-for-woocommerce/includes/pisol.class.form.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/live-sales-notifications-for-woocommerce/admin/class-pisol-sales-notification-text.php:192
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/live-sales-notifications-for-woocommerce/includes/includes.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/live-sales-notifications-for-woocommerce/admin/class-pisol-sales-notification-translate.php:138
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/live-sales-notifications-for-woocommerce/admin/class-pisol-sales-notification-option.php:120
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/live-sales-notifications-for-woocommerce/includes/conflict-fixer.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/live-sales-notifications-for-woocommerce/admin/class-pisol-sales-notification-design.php:212
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/live-sales-notifications-for-woocommerce/admin/class-pisol-sales-notification-control.php:112
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/live-sales-notifications-for-woocommerce/admin/class-pisol-sales-notification-product.php:355
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/live-sales-notifications-for-woocommerce/includes/banner-sample.php:63

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

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention: Please take inspiration from this readme.txt

live-sales-notifications-for-woocommerce/pisol-sales-notification.php 85% from 13 tests

This is the main PHP file of "Live sales notification for WooCommerce, Fake sales notification for WooCommerce, Recent sales popup for WooCommerce" version 2.2.42, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("live-sales-notifications-for-woocommerce.php" instead of "pisol-sales-notification.php")

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
Success! There were no dangerous files found in this plugin16,976 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
CSS42,066219,459
SVG74564,586
PHP307534452,585
JavaScript66963346

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity12.48
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods145
▷ Static methods117.59%
▷ Public methods14096.55%
▷ Protected methods00.00%
▷ Private methods53.45%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/close.png4.32KB3.39KB▼ 21.57%
includes/background.png74.27KB26.29KB▼ 64.60%
admin/img/pi.png1.48KB1.11KB▼ 24.83%
admin/img/pi-web-solution.png21.25KB9.42KB▼ 55.67%