66% export-import-for-woocommerce

Code Review | Export Import For WooCommerce

WordPress plugin Export Import For WooCommerce scored66%from 54 tests.

About plugin

  • Plugin page: export-import-for...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Oct 2, 2020
  • Latest release: May 1, 2023
  • Number of updates: 5
  • Update frequency: every 188.2 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /743 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by Export Import For WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2440.17 ▲4.66
Dashboard /wp-admin3.40 ▲0.0946.25 ▼1.87
Posts /wp-admin/edit.php3.51 ▲0.1543.91 ▼2.46
Add New Post /wp-admin/post-new.php5.98 ▲0.0982.84 ▼3.66
Media Library /wp-admin/upload.php3.32 ▲0.0938.01 ▲3.41
Export Import WC /wp-admin/admin.php?page=woie-settings3.3937.17

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
woie_options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
recovery_mode_email_last_sent
widget_recent-comments

Browser metrics Passed 4 tests

Export Import For WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.23 ▼0.411.99 ▲0.3638.68 ▼3.30
Dashboard /wp-admin2,193 ▲155.56 ▼0.2182.86 ▼15.1836.96 ▼9.38
Posts /wp-admin/edit.php2,083 ▼202.01 ▲0.0134.15 ▼2.8233.55 ▼2.20
Add New Post /wp-admin/post-new.php1,530 ▲223.25 ▲0.09684.28 ▲1.9861.75 ▼9.04
Media Library /wp-admin/upload.php1,404 ▲44.16 ▼0.0496.53 ▼0.6644.41 ▼0.72
Export Import WC /wp-admin/admin.php?page=woie-settings1,1633.9368.3777.67

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • widget_recent-posts
    • woie_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=woie-settings
    • > Error in wp-content/plugins/export-import-for-woocommerce/inc/woie_settings.php+150
    Uncaught Error: Call to undefined function wc_get_order_statuses() in wp-content/plugins/export-import-for-woocommerce/inc/woie_settings.php:150
    Stack trace:
    #0 wp-content/plugins/export-import-for-woocommerce/inc/functions.php(156): include_once()
    #1 wp-includes/class-wp-hook.php(310): woie_settings()
    #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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/export-import-for-woocommerce/index.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/export-import-for-woocommerce/inc/functions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/export-import-for-woocommerce/inc/woie_settings.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=woie-settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught Error: Could not find select element

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: product import, migration, export product, csv, export

export-import-for-woocommerce/index.php 77% from 13 tests

The principal PHP file in "Export Import For WooCommerce" v. 1.2.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • 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: Name the main plugin file the same as the plugin slug ("export-import-for-woocommerce.php" instead of "index.php")
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin10,657 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,546
PHP552921728
JavaScript520330250
CSS42813133

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity4.71
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions1076.92%
▷ Anonymous functions323.08%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/woo.png6.68KB3.20KB▼ 52.07%