78% import-export-for-woocommerce

Code Review | Import Export For WooCommerce

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

About plugin

  • Plugin page: import-export-for...
  • Plugin version: 1.5
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 3, 2020
  • Latest release: Nov 9, 2023
  • Number of updates: 27
  • Update frequency: every 43.0 days
  • Top authors: sidngr (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

200+ active /4,258 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: ▼6.43ms] Passed 4 tests

A check of server-side resources used by Import Export For WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.98 ▼0.96
Dashboard /wp-admin3.33 ▼0.0248.33 ▼12.51
Posts /wp-admin/edit.php3.38 ▲0.0244.57 ▼0.68
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.89 ▼11.57
Media Library /wp-admin/upload.php3.25 ▲0.0232.62 ▼0.67

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

Browser metrics Passed 4 tests

Import Export For WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7414.23 ▼0.111.83 ▲0.0642.10 ▼2.12
Dashboard /wp-admin2,195 ▲145.49 ▼0.1986.55 ▼26.7238.35 ▼5.98
Posts /wp-admin/edit.php2,107 ▲71.97 ▼0.0435.70 ▼1.9031.55 ▼1.76
Add New Post /wp-admin/post-new.php1,532 ▲322.85 ▼0.23652.04 ▲28.1254.70 ▲1.22
Media Library /wp-admin/upload.php1,406 ▲64.20 ▼0.0895.11 ▼8.9841.59 ▼0.10

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/import-export-for-woocommerce/templates/buy-now.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'SN_WIE_INIT' not found in wp-content/plugins/import-export-for-woocommerce/templates/coupon/navigation.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'SN_WIE_INIT' not found in wp-content/plugins/import-export-for-woocommerce/templates/product-review/navigation.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'SN_WIE_INIT' not found in wp-content/plugins/import-export-for-woocommerce/templates/product-category/navigation.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'SN_WIE_INIT' not found in wp-content/plugins/import-export-for-woocommerce/templates/user/navigation.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'SN_WIE_INIT' not found in wp-content/plugins/import-export-for-woocommerce/templates/order/navigation.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'SN_WIE_INIT' not found in wp-content/plugins/import-export-for-woocommerce/templates/product/navigation.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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 require attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt might help

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

The main PHP file in "Import Export For WooCommerce" ver. 1.5 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("import-export-for-woocommerce.php" instead of "init.php")

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
Everything looks great! No dangerous files found in this plugin9,778 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
PHP678291,2085,651
JavaScript103864473,023
CSS218321,104

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity66.67
▷ Minimum class complexity1.00
▷ Maximum class complexity290.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods169
▷ Static methods9656.80%
▷ Public methods8550.30%
▷ Protected methods00.00%
▷ Private methods8449.70%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.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
8 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/order-icon.png1.13KB0.52KB▼ 54.11%
assets/images/attribute-icon.png1.04KB0.48KB▼ 53.77%
assets/images/icon.png1.12KB0.24KB▼ 78.76%
assets/images/category-icon.png1.20KB0.53KB▼ 55.67%
assets/images/coupon-icon.png0.72KB0.39KB▼ 45.93%