77% wc-order-reports

Code Review | Order Reports for WooCommerce

WordPress plugin Order Reports for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: wc-order-reports
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 7, 2021
  • Latest release: Sep 6, 2022
  • Number of updates: 30
  • Update frequency: every 12.1 days
  • Top authors: wooramn (83.33%)growcommerce (20%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /3,108 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
Installer ran successfully

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

Server-side resources used by Order Reports for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0045.38 ▲2.03
Dashboard /wp-admin3.31 ▲0.0045.37 ▼7.40
Posts /wp-admin/edit.php3.36 ▲0.0049.91 ▲1.36
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.65 ▼25.76
Media Library /wp-admin/upload.php3.23 ▲0.0035.35 ▼2.85

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

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

Browser metrics Passed 4 tests

Order Reports for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.47 ▼0.081.86 ▼0.0545.26 ▲2.43
Dashboard /wp-admin2,200 ▲95.78 ▲0.8993.24 ▼6.5538.92 ▼4.21
Posts /wp-admin/edit.php2,092 ▲32.02 ▲0.0137.90 ▲4.0534.34 ▼0.74
Add New Post /wp-admin/post-new.php1,529 ▲1018.21 ▼5.09618.16 ▼42.7852.20 ▼7.47
Media Library /wp-admin/upload.php1,382 ▼04.17 ▼0.1794.56 ▼4.1741.71 ▼2.36

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wc-order-reports/includes/packages/vendor/markbaker/matrix/buildPhar.php
    • > /wp-content/plugins/wc-order-reports/public/partials/wc-order-reports-public-display.php
  • 443× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_Filter' not found in wp-content/plugins/wc-order-reports/includes/packages/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Filter/YouTube.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrDef' not found in wp-content/plugins/wc-order-reports/includes/packages/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Style\\ConditionalFormatting\\Wizard\\WizardAbstract' not found in wp-content/plugins/wc-order-reports/includes/packages/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/ConditionalFormatting/Wizard/Blanks.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Calculation\\LookupRef\\LookupRefValidations' not found in wp-content/plugins/wc-order-reports/includes/packages/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/LookupRef/Sort.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\BaseWriter' not found in wp-content/plugins/wc-order-reports/includes/packages/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods.php:18
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/wc-order-reports/includes/packages/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Trends.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'ZipStream\\Exception' not found in wp-content/plugins/wc-order-reports/includes/packages/vendor/maennchen/zipstream-php/src/Exception/EncodingException.php:11
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/wc-order-reports/includes/packages/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Difference.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_HTMLModule' not found in wp-content/plugins/wc-order-reports/includes/packages/vendor/ezyang/htmlpurifier/library/HTMLPurifier/HTMLModule/Object.php:8
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/wc-order-reports/includes/packages/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Binomial.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
  • Requires php: The plugin version is formatted incorrectly
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can look at the official readme.txt

wc-order-reports/wc-order-reports.php 92% from 13 tests

"Order Reports for WooCommerce" version 1.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 176 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin120,208 lines of code in 879 files:
LanguageFilesBlank linesComment linesLines of code
PHP82220,50653,399100,247
JavaScript731133314,923
CSS5671311,815
Markdown2254701,499
JSON12001,169
YAML5510237
SVG100212
XML4204105
INI1111

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,022)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 333)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity19.38
▷ Minimum class complexity1.00
▷ Maximum class complexity1,022.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity333.00
Code structure
Namespaces87
Interfaces29
Traits1
Classes762
▷ Abstract classes445.77%
▷ Concrete classes71894.23%
▷ Final classes40.56%
Methods5,710
▷ Static methods1,71430.02%
▷ Public methods4,24174.27%
▷ Protected methods3125.46%
▷ Private methods1,15720.26%
Functions140
▷ Named functions8560.71%
▷ Anonymous functions5539.29%
Constants1,309
▷ Global constants151.15%
▷ Class constants1,29498.85%
▷ Public constants1,19392.19%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
17 PNG files occupy 0.27MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/download.png1.27KB0.54KB▼ 57.80%
admin/css/images/ui-icons_cd0a0a_256x240.png4.51KB4.18KB▼ 7.28%
admin/css/images/ui-bg_glass_65_ffffff_1x400.png0.26KB0.09KB▼ 66.79%
admin/images/chart.png2.21KB1.11KB▼ 49.78%
admin/css/images/ui-bg_glass_55_fbf9ee_1x400.png0.38KB0.12KB▼ 67.68%