84% wp-sales-notifier

Code Review | Live Sales Notifier for WooCommerce

WordPress plugin Live Sales Notifier for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wp-sales-notifier
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: Dec 2, 2016
  • Latest release: Apr 19, 2023
  • Number of updates: 17
  • Update frequency: every 136.3 days
  • Top authors: india-web-developer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,215 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Analyzing server-side resources used by Live Sales Notifier for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.09 ▼4.88
Dashboard /wp-admin3.31 ▲0.0045.68 ▼5.79
Posts /wp-admin/edit.php3.36 ▲0.0051.17 ▲2.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.68 ▼16.46
Media Library /wp-admin/upload.php3.23 ▲0.0032.76 ▼4.15

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

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

Browser metrics Passed 4 tests

Live Sales Notifier for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.81 ▲0.521.77 ▲0.0339.10 ▼12.27
Dashboard /wp-admin2,206 ▲154.82 ▼0.0799.71 ▼29.1940.46 ▼11.09
Posts /wp-admin/edit.php2,086 ▼62.05 ▲0.0436.65 ▼3.2333.22 ▼1.61
Add New Post /wp-admin/post-new.php1,532 ▲1823.27 ▲5.73658.52 ▼18.7855.38 ▼7.79
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0296.70 ▼7.3841.75 ▼3.40

Uninstaller [IO: ▲0.00MB] [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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% 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)
Everything seems fine, however 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/wp-sales-notifier/lib/settings.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Add an image for screenshot #2 (Plugin Frontend Preview)
Please take inspiration from this readme.txt

wp-sales-notifier/wp-sales-notifier.php Passed 13 tests

Analyzing the main PHP file in "Live Sales Notifier for WooCommerce" version 1.4
77 characters long description:
It's a very simple plugin for publish resent order notification on your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected358 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP35488346
JavaScript10111
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods428.57%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/close-lf.png2.85KB0.27KB▼ 90.62%