62% product-import-export-for-woo

Code Review | Product Import Export for WooCommerce

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

About plugin

  • Plugin page: product-import-ex...
  • Plugin version: 2.3.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 14, 2016
  • Latest release: Nov 21, 2023
  • Number of updates: 208
  • Update frequency: every 13.5 days
  • Top authors: webtoffee (51.44%)hikeforce (32.69%)mujeebur (9.13%)xadapter (7.69%)

Code review

54 tests

User reviews

348 reviews

Install metrics

90,000+ active /2,916,088 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
Installer ran successfully

Server metrics [RAM: ▲0.87MB] [CPU: ▲0.92ms] Passed 4 tests

This is a short check of server-side resources used by Product Import Export for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.26 ▼2.45
Dashboard /wp-admin4.52 ▲1.1758.16 ▼3.38
Posts /wp-admin/edit.php4.57 ▲1.2159.52 ▲13.14
Add New Post /wp-admin/post-new.php7.04 ▲1.1596.63 ▼0.09
Media Library /wp-admin/upload.php4.38 ▲1.1545.32 ▲9.62
Import /wp-admin/admin.php?page=wt_import_export_for_woo_basic_import4.3442.68
Export /wp-admin/admin.php?page=wt_import_export_for_woo_basic_export4.4140.33
History /wp-admin/admin.php?page=wt_import_export_for_woo_basic_history4.4242.92
General Settings /wp-admin/admin.php?page=wt_import_export_for_woo_basic4.5746.67
Pro upgrade /wp-admin/admin.php?page=wt_import_export_for_woo_basic_export-premium4.3339.75
Import Logs /wp-admin/admin.php?page=wt_import_export_for_woo_basic_history_log4.3739.99

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 177 new files
Database: 2 new tables, 10 new options
New tables
wp_wt_iew_action_history
wp_wt_iew_mapping_template
New WordPress options
wt_p_iew_is_active
wt_p_iew_basic_start_date
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
recovery_mode_email_last_sent
wt_iew_admin_modules
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Product Import Export for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8214.25 ▼0.101.65 ▼0.1930.62 ▼13.06
Dashboard /wp-admin2,249 ▲725.57 ▼0.0495.00 ▼7.2447.49 ▲1.80
Posts /wp-admin/edit.php2,154 ▲541.97 ▼0.0539.88 ▲0.9641.46 ▲5.05
Add New Post /wp-admin/post-new.php1,572 ▲4523.25 ▲0.05697.74 ▲16.1857.13 ▼5.14
Media Library /wp-admin/upload.php1,454 ▲574.19 ▲0.03106.32 ▲3.1644.88 ▲0.35
Import /wp-admin/admin.php?page=wt_import_export_for_woo_basic_import7861.6412.7830.30
Export /wp-admin/admin.php?page=wt_import_export_for_woo_basic_export1,8042.3643.1554.98
History /wp-admin/admin.php?page=wt_import_export_for_woo_basic_history9772.1630.8836.50
General Settings /wp-admin/admin.php?page=wt_import_export_for_woo_basic4,0722.0756.1289.30
Pro upgrade /wp-admin/admin.php?page=wt_import_export_for_woo_basic_export-premium7151.127.6421.56
Import Logs /wp-admin/admin.php?page=wt_import_export_for_woo_basic_history_log8762.1631.8027.44

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_wt_iew_mapping_template
    • wp_wt_iew_action_history
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • wt_p_iew_basic_start_date
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • wt_iew_admin_modules
    • can_compress_scripts
    • 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
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wt_import_export_for_woo_basic_import
    • > Error in wp-content/plugins/product-import-export-for-woo/admin/modules/import/import.php+382
    Uncaught Error: Call to undefined function WC() in wp-content/plugins/product-import-export-for-woo/admin/modules/import/import.php:382
    Stack trace:
    #0 wp-content/plugins/product-import-export-for-woo/admin/modules/import/import.php(317): 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
  • 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)

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/product-import-export-for-woo/public/partials/wt-import-export-for-woo-public-display.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/product-import-export-for-woo/admin/modules/product_review/data/data/data-wf-reserved-fields-pair.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-import-export-for-woo/includes/class-wf-prodimpexp-plugin-uninstall-feedback.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/product-import-export-for-woo/admin/modules/product/data/data-wf-hidden-meta-columns.php:4

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

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

product-import-export-for-woo/product-import-export-for-woo.php 92% from 13 tests

The primary PHP file in "Product Import Export for WooCommerce" version 2.3.7 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Requires at least: Required version must be the same as 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 file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin21,453 lines of code in 120 files:
LanguageFilesBlank linesComment linesLines of code
PHP862,5852,42215,817
JavaScript82531223,447
CSS4134881,777
SVG2200412

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 146)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity57.53
▷ Minimum class complexity1.00
▷ Maximum class complexity425.00
Average method complexity5.69
▷ Minimum method complexity1.00
▷ Maximum method complexity146.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes38
▷ Abstract classes12.63%
▷ Concrete classes3797.37%
▷ Final classes00.00%
Methods463
▷ Static methods9620.73%
▷ Public methods39986.18%
▷ Protected methods408.64%
▷ Private methods245.18%
Functions26
▷ Named functions1765.38%
▷ Anonymous functions934.62%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
46 PNG files occupy 0.43MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/other_solutions/pdf-invoice-plugin.png18.78KB18.56KB▼ 1.13%
assets/images/other_solutions/wt_pi_logo.png4.67KB2.66KB▼ 43.01%
(invalid) assets/images/other_solutions/gdpr-cookie-concent-plugin.png6.00KB0.00KB▼ 100.00%
assets/images/other_solutions/fbt_plugin.png3.35KB3.33KB▼ 0.73%
assets/images/other_solutions/Sequential-order-number-plugin.png14.86KB14.76KB▼ 0.67%