83% order-reports-for-woocommerce

Code Review | Order Reports for WooCommerce

WordPress plugin Order Reports for WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: order-reports-for...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.7
  • WordPress version: 6.3.1
  • First release: Apr 14, 2021
  • Latest release: Apr 14, 2021
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: blueorange589 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 463 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
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Order Reports for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.96 ▼8.13
Dashboard /wp-admin3.32 ▲0.0146.96 ▲0.24
Posts /wp-admin/edit.php3.37 ▲0.0142.36 ▼3.46
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.76 ▲0.72
Media Library /wp-admin/upload.php3.24 ▲0.0135.97 ▼2.23

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 74 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Order Reports for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.14 ▼1.271.73 ▼0.3047.80 ▼0.71
Dashboard /wp-admin2,211 ▲205.81 ▲0.7897.38 ▼0.8339.98 ▼7.71
Posts /wp-admin/edit.php2,072 ▼172.05 ▲0.0534.45 ▼0.4333.79 ▲1.45
Add New Post /wp-admin/post-new.php1,539 ▲523.11 ▼0.02651.52 ▼36.3668.88 ▲11.29
Media Library /wp-admin/upload.php1,396 ▲84.24 ▲0.0196.68 ▼11.4641.32 ▼5.07

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/order-reports-for-woocommerce/admin/views/dashboard.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'orfw_app' not found in wp-content/plugins/order-reports-for-woocommerce/classes/orders.class.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: order reports, export orders, filter orders

order-reports-for-woocommerce/order-reports.php 69% from 13 tests

This is the main PHP file of "Order Reports for WooCommerce" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "3.0.0")
  • Domain Path: The domain path points to a folder that does not exist ("/language")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("order-reports-for-woocommerce.php" instead of "order-reports.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin12,839 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71,1601,4989,496
SVG200151,303
CSS4210271,146
PHP14204477890
Markdown1104

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity9.91
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods53
▷ Static methods47.55%
▷ Public methods4890.57%
▷ Protected methods00.00%
▷ Private methods59.43%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/lib/jqueryui/images/ui-icons_555555_256x240.png3.68KB4.18KB0.00%
admin/assets/lib/jqueryui/images/ui-icons_444444_256x240.png3.68KB4.18KB0.00%