62% order-import-export-for-woocommerce

Code Review | Order Export & Order Import for WooCommerce

WordPress plugin Order Export & Order Import for WooCommerce scored62%from 54 tests.

About plugin

  • Plugin page: order-import-expo...
  • Plugin version: 2.4.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 22, 2016
  • Latest release: Nov 21, 2023
  • Number of updates: 163
  • Update frequency: every 16.6 days
  • Top authors: webtoffee (60.12%)hikeforce (24.54%)mujeebur (8.59%)xadapter (8.59%)

Code review

54 tests

User reviews

255 reviews

Install metrics

50,000+ active /1,269,257 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.78MB] [CPU: ▼1.92ms] Passed 4 tests

Server-side resources used by Order Export & Order Import for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.57 ▼11.80
Dashboard /wp-admin4.36 ▲1.0155.96 ▼9.01
Posts /wp-admin/edit.php4.48 ▲1.1158.29 ▲9.01
Add New Post /wp-admin/post-new.php6.94 ▲1.05102.37 ▲4.12
Media Library /wp-admin/upload.php4.28 ▲1.0545.89 ▲9.29
History /wp-admin/admin.php?page=wt_import_export_for_woo_basic_history4.3245.10
Pro upgrade /wp-admin/admin.php?page=wt_import_export_for_woo_basic_export-premium4.2336.46
Import Logs /wp-admin/admin.php?page=wt_import_export_for_woo_basic_history_log4.2740.01
General Settings /wp-admin/admin.php?page=wt_import_export_for_woo_basic4.4947.84
Export /wp-admin/admin.php?page=wt_import_export_for_woo_basic_export4.3151.24
Import /wp-admin/admin.php?page=wt_import_export_for_woo_basic_import4.2439.35

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 171 new files
Database: 2 new tables, 10 new options
New tables
wp_wt_iew_action_history
wp_wt_iew_mapping_template
New WordPress options
widget_theysaidso_widget
recovery_mode_email_last_sent
theysaidso_admin_options
wt_iew_admin_modules
widget_recent-posts
wt_o_iew_is_active
wt_o_iew_basic_start_date
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Order Export & Order Import for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲7214.11 ▼0.231.71 ▼0.1227.63 ▼14.76
Dashboard /wp-admin2,246 ▲665.58 ▼0.0394.38 ▲3.4346.57 ▲3.12
Posts /wp-admin/edit.php2,154 ▲541.95 ▼0.0740.57 ▲2.1340.51 ▲7.55
Add New Post /wp-admin/post-new.php1,580 ▲5425.36 ▲2.41634.39 ▲45.0969.58 ▲17.92
Media Library /wp-admin/upload.php1,451 ▲514.15 ▼0.0998.22 ▲2.4445.16 ▲4.98
History /wp-admin/admin.php?page=wt_import_export_for_woo_basic_history9772.1531.5038.32
Pro upgrade /wp-admin/admin.php?page=wt_import_export_for_woo_basic_export-premium7151.127.3423.96
Import Logs /wp-admin/admin.php?page=wt_import_export_for_woo_basic_history_log8762.1628.7929.00
General Settings /wp-admin/admin.php?page=wt_import_export_for_woo_basic4,0252.1160.7385.80
Export /wp-admin/admin.php?page=wt_import_export_for_woo_basic_export1,8302.4841.1854.93
Import /wp-admin/admin.php?page=wt_import_export_for_woo_basic_import7861.5013.5727.67

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_wt_iew_mapping_template
    • wp_wt_iew_action_history
  • Zombie WordPress options were found after uninstall: 9 options
    • wt_o_iew_basic_start_date
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • wt_iew_admin_modules
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wt_import_export_for_woo_basic_export-premium
    • > Warning in wp-includes/pluggable.php+1438
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)
    • > GET request to /wp-admin/admin.php?page=wt_import_export_for_woo_basic_import
    • > Error in wp-content/plugins/order-import-export-for-woocommerce/admin/modules/import/import.php+381
    Uncaught Error: Call to undefined function WC() in wp-content/plugins/order-import-export-for-woocommerce/admin/modules/import/import.php:381
    Stack trace:
    #0 wp-content/plugins/order-import-export-for-woocommerce/admin/modules/import/import.php(316): Wt_Import_Export_For_Woo_Basic_Import->enqueue_assets()
    #1 wp-includes/class-wp-hook.php(310): Wt_Import_Export_For_Woo_Basic_Import->admin_settings_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

SRP 0% 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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/order-import-export-for-woocommerce/public/partials/wt-import-export-for-woo-public-display.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/order-import-export-for-woocommerce/admin/modules/order/data/data-wf-xml-default-meta.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/order-import-export-for-woocommerce/admin/modules/coupon/data/data/data-wf-reserved-fields-pair.php:4
    • > PHP Warning
      Use of undefined constant WT_O_IEW_VERSION - assumed 'WT_O_IEW_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/order-import-export-for-woocommerce/includes/class-wf-orderimpexp-plugin-uninstall-feedback.php on line 307
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/order-import-export-for-woocommerce/admin/modules/order/data/data-wf-exclude-hidden-meta-columns.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/order-import-export-for-woocommerce/includes/class-wf-orderimpexp-plugin-uninstall-feedback.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/order-import-export-for-woocommerce/admin/modules/order/data/data-wf-hidden-meta-columns.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
Please take inspiration from this readme.txt

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

The primary PHP file in "Order Export & Order Import for WooCommerce" version 2.4.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "3.0")

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin21,517 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
PHP792,1232,15515,849
JavaScript82491383,479
CSS4126941,777
SVG2200412

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 109)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity69.85
▷ Minimum class complexity1.00
▷ Maximum class complexity542.00
Average method complexity6.66
▷ Minimum method complexity1.00
▷ Maximum method complexity109.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes33
▷ Abstract classes13.03%
▷ Concrete classes3296.97%
▷ Final classes00.00%
Methods408
▷ Static methods9924.26%
▷ Public methods34484.31%
▷ Protected methods4110.05%
▷ Private methods235.64%
Functions25
▷ Named functions1768.00%
▷ Anonymous functions832.00%
Constants11
▷ Global constants11100.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
46 PNG files occupy 0.43MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/other_solutions/suite-1-plugin.png31.38KB31.29KB0.31%
assets/images/other_solutions/product-import-export-plugin.png24.67KB24.65KB0.08%
assets/images/wt-error-icon.png1.33KB0.70KB▼ 47.24%
admin/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.31KB0.18KB▼ 42.95%
assets/images/other_solutions/wt_ipc_logo.png3.24KB2.22KB▼ 31.47%