84% order-xml-file-export-import-for-woocommerce

Code Review | Order XML File Export Import for WooCommerce

WordPress plugin Order XML File Export Import for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: order-xml-file-ex...
  • Plugin version: 1.4.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Aug 10, 2016
  • Latest release: Mar 7, 2023
  • Number of updates: 92
  • Update frequency: every 26.1 days
  • Top authors: hikeforce (45.65%)webtoffee (35.87%)xadapter (15.22%)mujeebur (6.52%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /22,165 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Order XML File Export Import for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.52 ▼8.31
Dashboard /wp-admin3.31 ▼0.0449.44 ▼6.57
Posts /wp-admin/edit.php3.36 ▲0.0049.82 ▲1.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.67 ▼28.69
Media Library /wp-admin/upload.php3.23 ▲0.0033.62 ▼0.56

Server storage [IO: ▲0.43MB] [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: 57 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Order XML File Export Import for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.22 ▼1.161.67 ▼0.1538.97 ▼5.46
Dashboard /wp-admin2,206 ▲185.84 ▲0.9797.06 ▼11.8339.76 ▲2.43
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0639.61 ▼0.2834.31 ▼0.80
Add New Post /wp-admin/post-new.php1,520 ▼2223.39 ▲4.79606.92 ▼11.5153.01 ▲4.99
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0297.84 ▼0.2441.43 ▼2.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_order_statuses() in wp-content/plugins/order-xml-file-export-import-for-woocommerce/includes/views/export/html-wf-export-orders.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/order-xml-file-export-import-for-woocommerce/includes/views/import/html-wf-import-orders.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/order-xml-file-export-import-for-woocommerce/includes/importer/views/html-wf-import-greeting.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/order-xml-file-export-import-for-woocommerce/includes/views/html-wf-common-header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/order-xml-file-export-import-for-woocommerce/includes/views/html-wf-common-header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/order-xml-file-export-import-for-woocommerce/includes/views/help/html-wf-help.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/order-xml-file-export-import-for-woocommerce/includes/views/html-wf-getting-started.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/order-xml-file-export-import-for-woocommerce/includes/importer/views/html-wf-import-options.php:1

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #4 (Stamps App Screen)
The official readme.txt is a good inspiration

order-xml-file-export-import-for-woocommerce/order-xml-file-export-import-for-woocommerce.php 92% from 13 tests

The main file in "Order XML File Export Import for WooCommerce" v. 1.4.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 158 characters long)

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
There were no executable files found in this plugin4,034 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP29420632,405
XML9200723
CSS1121547
PO File1113123287
SVG50054
JavaScript10018

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity15.26
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods75
▷ Static methods56.67%
▷ Public methods7194.67%
▷ Protected methods11.33%
▷ Private methods34.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
7 PNG files occupy 0.16MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wf-success.png3.24KB0.59KB▼ 81.90%
images/calendar.png1.27KB1.07KB▼ 15.78%
images/wf-failed.png3.30KB0.54KB▼ 83.61%
images/Order-Import-Export-for-WooCommerce-Image.png146.82KB62.05KB▼ 57.74%
images/storefrog.png8.44KB4.63KB▼ 45.21%