73% sales-order-report-for-woocommerce

Code Review | Sales Order Report for WooCommerce

WordPress plugin Sales Order Report for WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: sales-order-repor...
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 1.4.1-5.8.2
  • WordPress version: 6.3.1
  • First release: Sep 30, 2021
  • Latest release: Dec 9, 2021
  • Number of updates: 28
  • Update frequency: every 2.6 days
  • Top authors: esoftcreator (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /950 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Sales Order Report for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.01 ▼4.33
Dashboard /wp-admin3.31 ▼0.0445.45 ▼20.95
Posts /wp-admin/edit.php3.36 ▲0.0047.93 ▼5.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.86 ▼9.41
Media Library /wp-admin/upload.php3.23 ▲0.0040.64 ▲3.56

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 47 new files
Database: 2 new tables, 7 new options
New tables
wp_esc_user_cart_event
wp_esc_user_behavior
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
esc_migration_db
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Sales Order Report for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.60 ▼0.782.16 ▲0.1943.18 ▼4.53
Dashboard /wp-admin2,221 ▲545.88 ▲0.18106.83 ▼10.3941.52 ▼2.29
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0139.64 ▼0.5434.58 ▼4.96
Add New Post /wp-admin/post-new.php1,541 ▼423.24 ▼0.02692.93 ▲1.6552.83 ▼11.55
Media Library /wp-admin/upload.php1,400 ▼04.24 ▼0.0199.92 ▼8.5243.23 ▼4.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 2 tables
    • wp_esc_user_cart_event
    • wp_esc_user_behavior
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • esc_migration_db
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Esoftcreator_Helper' not found in wp-content/plugins/sales-order-report-for-woocommerce/admin/partials/common/class-esoftcreator-global.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Esoftcreator_Helper' not found in wp-content/plugins/sales-order-report-for-woocommerce/admin/partials/common/class-esoftcreator-header.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sales-order-report-for-woocommerce/admin/partials/common/class-esoftcreator-footer.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
  • Donate link: Invalid url: ""
  • Requires php: The plugin version is formatted incorrectly
You can look at the official readme.txt

sales-order-report-for-woocommerce/sales-order-report-for-woocommerce.php 85% from 13 tests

The main PHP file in "Sales Order Report for WooCommerce" ver. 2.1.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0.0" instead of "1.4.1")
  • Description: Keep the plugin description shorter than 140 characters (currently 250 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin19,569 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript660440915,959
PHP222287282,449
CSS310868905
PO File2112260256

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity14.16
▷ Minimum class complexity1.00
▷ Maximum class complexity105.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods101
▷ Static methods21.98%
▷ Public methods9493.07%
▷ Protected methods32.97%
▷ Private methods43.96%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/icon.png1.77KB1.04KB▼ 41.19%
admin/images/rate-us.png11.33KB5.26KB▼ 53.55%
admin/images/caret-down.png0.20KB0.17KB▼ 11.88%
admin/images/claendar-icon.png0.29KB0.23KB▼ 21.67%