94% export-order-items-for-woocommerce

Code Review | Export Order Items for WooCommerce

WordPress plugin Export Order Items for WooCommerce scored 94% from 54 tests.

About plugin

  • Plugin page: export-order-item...
  • Plugin version: 1.0.10
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.6.1
  • WordPress version: 5.8.1
  • First release: Dec 28, 2015
  • Latest release: Feb 18, 2021
  • Number of updates: 37
  • Update frequency: every 51.3 days
  • Top authors: hearken (67.57%)aspengrovestudios (35.14%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active / 11,438 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.11MB] [CPU: ▼135.75ms] Passed 4 tests

This is a short check of server-side resources used by Export Order Items for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.1136.76 ▲7.51
Dashboard /wp-admin3.17 ▲0.1141.34 ▲5.64
Posts /wp-admin/edit.php3.22 ▲0.1141.80 ▼3.46
Add New Post /wp-admin/post-new.php5.53 ▲0.1094.49 ▼538.15
Media Library /wp-admin/upload.php3.11 ▲0.1033.60 ▼7.01

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Export Order Items for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.12 ▲0.427.03 ▼0.9050.90 ▼1.55
Dashboard /wp-admin2,973 ▲396.11 ▲0.17132.52 ▼9.23107.93 ▼0.73
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0166.04 ▲3.5490.89 ▲3.91
Add New Post /wp-admin/post-new.php1,498 ▼37418.80 ▼0.33359.69 ▼6.11114.24 ▲0.14
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.00141.25 ▼2.31122.18 ▼0.21

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/export-order-items-for-woocommerce/admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/export-order-items-for-woocommerce/export-order-items-for-woocommerce.php:48

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 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #2, #3 in export-order-items-for-woocommerce/assets to your readme.txt
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

export-order-items-for-woocommerce/export-order-items-for-woocommerce.php Passed 13 tests

The main PHP file in "Export Order Items for WooCommerce" ver. 1.0.10 adds more information about the plugin and also serves as the entry point for this plugin
128 characters long description:
Export order items (products ordered) in CSV (Comma Seperated Values) format, with product, line item, order, and customer data.

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
Success! There were no dangerous files found in this plugin3,276 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP311284902
JavaScript3153109825
CSS36933820
Sass1114737693
SVG60236

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity4.33
▷ Minimum method complexity4.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods3100.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.12MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/frontend-report-for-woocommerce.png34.89KB36.29KB0.00%
images/scheduled_email_reports_for_woocommerce.png45.14KB31.50KB▼ 30.22%
images/export_order_items_pro.png44.09KB31.37KB▼ 28.84%