84% woc-order-alert

Code Review | Order Notification for WooCommerce – Get Audio Alert on new Orders

WordPress plugin Order Notification for WooCommerce – Get Audio Alert on new Orders scored84%from 54 tests.

About plugin

  • Plugin page: woc-order-alert
  • Plugin version: 3.5.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 5, 2016
  • Latest release: Nov 11, 2023
  • Number of updates: 101
  • Update frequency: every 26.9 days
  • Top authors: pluginbazar (58.42%)jaedm97 (42.57%)

Code review

54 tests

User reviews

6 reviews

Install metrics

3,000+ active /23,188 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.41ms] Passed 4 tests

Analyzing server-side resources used by Order Notification for WooCommerce – Get Audio Alert on new Orders
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.31 ▼3.26
Dashboard /wp-admin3.31 ▼0.0444.21 ▼16.05
Posts /wp-admin/edit.php3.36 ▲0.0043.38 ▼3.90
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.96 ▼18.41
Media Library /wp-admin/upload.php3.23 ▲0.0034.46 ▲4.16

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 96 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Order Notification for WooCommerce – Get Audio Alert on new Orders
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.21 ▼0.551.62 ▲0.0337.27 ▼7.51
Dashboard /wp-admin2,192 ▲155.50 ▼0.0891.47 ▼8.0838.40 ▼4.88
Posts /wp-admin/edit.php2,097 ▼32.06 ▲0.1039.97 ▲0.2135.60 ▲1.47
Add New Post /wp-admin/post-new.php1,526 ▼023.03 ▲0.02696.78 ▲85.3053.53 ▲0.77
Media Library /wp-admin/upload.php1,403 ▲64.19 ▼0.05102.20 ▲0.1546.53 ▲2.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WPDK_Settings_Abstract' not found in wp-content/plugins/woc-order-alert/includes/wpdk/settings/classes/admin-options.class.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WPDK_Settings_Abstract' not found in wp-content/plugins/woc-order-alert/includes/wpdk/settings/classes/fields.class.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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 need to be fixed: The official readme.txt might help

woc-order-alert/woc-order-alert.php Passed 13 tests

The main PHP file in "Order Notification for WooCommerce – Get Audio Alert on new Orders" ver. 3.5.0 adds more information about the plugin and also serves as the entry point for this plugin
76 characters long description:
Play sound as notification instantly on new order in your WooCommerce store.

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 detected20,715 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
PHP762,6931,3028,105
JavaScript61,3405236,762
CSS61,0925435,833
Markdown18013
SVG2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity25.24
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity6.54
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes67
▷ Abstract classes22.99%
▷ Concrete classes6597.01%
▷ Final classes00.00%
Methods293
▷ Static methods4615.70%
▷ Public methods293100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/wpdk/settings/assets/images/checkerboard.png2.29KB2.54KB0.00%