87% woo-advanced-sales-report-email

Code Review | Sales Report Email for WooCommerce

WordPress plugin Sales Report Email for WooCommerce scored 87% from 54 tests.

About plugin

  • Plugin page: woo-advanced-sale...
  • Plugin version: 2.7.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 5.9.2
  • First release: Oct 17, 2018
  • Latest release: Mar 22, 2022
  • Number of updates: 89
  • Update frequency: every 14.1 days
  • Top authors: zorem (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 13,485 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼287.37ms] Passed 4 tests

This is a short check of server-side resources used by Sales Report Email for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0551.50 ▲1.86
Dashboard /wp-admin3.45 ▲0.0433.56 ▲0.86
Posts /wp-admin/edit.php3.68 ▲0.0438.13 ▲2.12
Add New Post /wp-admin/post-new.php6.92 ▼0.0591.54 ▼1,152.32
Media Library /wp-admin/upload.php3.33 ▲0.0424.89 ▲0.13

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 55 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sales Report Email for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,778 ▲2415.66 ▲0.135.83 ▼0.782.33 ▼0.48
Dashboard /wp-admin2,910 ▲566.14 ▼0.04117.14 ▼16.96155.88 ▼2.59
Posts /wp-admin/edit.php2,709 ▲153.24 ▼0.0063.64 ▼0.00138.93 ▼2.62
Add New Post /wp-admin/post-new.php1,761 ▲921.62 ▲0.62435.55 ▼16.35156.94 ▲1.73
Media Library /wp-admin/upload.php1,713 ▲155.52 ▲0.01144.60 ▲12.88186.89 ▼1.03

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/woo-advanced-sales-report-email/classes/views/asre_reports_tab.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: tab in wp-content/plugins/woo-advanced-sales-report-email/classes/views/asre_reports_tab.php on line 110
    • > PHP Notice
      Undefined variable: tab in wp-content/plugins/woo-advanced-sales-report-email/classes/views/asre_reports_tab.php on line 1
    • > PHP Notice
      Undefined variable: tab in wp-content/plugins/woo-advanced-sales-report-email/classes/views/asre_reports_tab.php on line 3
    • > PHP Notice
      Undefined variable: tab in wp-content/plugins/woo-advanced-sales-report-email/classes/views/asre_reports_tab.php on line 257
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/woo-advanced-sales-report-email/classes/views/asre_addons_tab.php:62

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes: The official readme.txt is a good inspiration

woo-advanced-sales-report-email/woocommerce-advanced-sales-report-email.php 77% from 13 tests

"Sales Report Email for WooCommerce" version 2.7.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: The description should be shorter than 140 characters (currently 173 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-advanced-sales-report-email.php" instead of "woocommerce-advanced-sales-report-email.php")

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
Success! There were no dangerous files found in this plugin12,085 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
CSS38535,5326,441
PHP185458063,753
PO File54454801,455
JavaScript34222380
SVG31356

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity22.88
▷ Minimum class complexity1.00
▷ Maximum class complexity247.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity81.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
Methods111
▷ Static methods1311.71%
▷ Public methods10594.59%
▷ Protected methods00.00%
▷ Private methods65.41%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
13 PNG files occupy 0.19MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/cbr-icon.png29.03KB4.35KB▼ 85.02%
assets/images/alp-icon.png26.99KB3.52KB▼ 86.96%
assets/images/sre-logo.png6.12KB3.26KB▼ 46.76%
classes/preview/image/arrow-red.png14.76KB0.45KB▼ 96.96%
assets/images/cev-icon.png18.66KB2.33KB▼ 87.50%