77% woo-product-excel-importer

Code Review | WordPress Product Excel Import & Export for WooCommerce

WordPress plugin WordPress Product Excel Import & Export for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: woo-product-excel...
  • Plugin version: 5.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-6.4
  • WordPress version: 6.3.1
  • First release: May 14, 2016
  • Latest release: Dec 3, 2023
  • Number of updates: 168
  • Update frequency: every 16.4 days
  • Top authors: taz_bambu (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

3,000+ active /128,080 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.41MB] [CPU: ▼2.41ms] Passed 4 tests

An overview of server-side resources used by WordPress Product Excel Import & Export for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4343.90 ▲5.22
Dashboard /wp-admin3.76 ▲0.4248.50 ▼12.02
Posts /wp-admin/edit.php3.82 ▲0.4650.35 ▲2.32
Add New Post /wp-admin/post-new.php6.30 ▲0.4185.41 ▼4.64
Media Library /wp-admin/upload.php3.62 ▲0.4037.43 ▲4.70
Import from Excel /wp-admin/admin.php?page=woo-product-importer3.5933.59
Import from Excel /wp-admin/edit.php?post_type=product&page=woo-product-importer3.6041.08

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 408 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Product Excel Import & Export for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲14013.90 ▼0.471.68 ▲0.0639.09 ▼1.51
Dashboard /wp-admin2,310 ▲1335.60 ▼0.03105.28 ▲3.8793.37 ▲47.75
Posts /wp-admin/edit.php2,223 ▲1202.99 ▲1.0042.36 ▼1.0434.55 ▼3.86
Add New Post /wp-admin/post-new.php1,636 ▲10724.18 ▲1.10712.09 ▲110.1535.00 ▼17.49
Media Library /wp-admin/upload.php1,506 ▲1065.22 ▲1.01101.47 ▲4.4267.10 ▲25.45
Import from Excel /wp-admin/admin.php?page=woo-product-importer1,5849.69305.3875.35
Import from Excel /wp-admin/edit.php?post_type=product&page=woo-product-importer1,5849.70309.4752.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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)
Everything seems fine, however this is by no means an exhaustive test

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 fix the following items
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-product-excel-importer/Classes/markbaker/complex/examples/testFunctions.php
    • > /wp-content/plugins/woo-product-excel-importer/Classes/markbaker/complex/examples/complexTest.php
    • > /wp-content/plugins/woo-product-excel-importer/Classes/markbaker/complex/examples/testOperations.php
    • > /wp-content/plugins/woo-product-excel-importer/Classes/markbaker/matrix/examples/test.php
    • > /wp-content/plugins/woo-product-excel-importer/Classes/markbaker/matrix/buildPhar.php
  • 98× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\WriterPart' not found in wp-content/plugins/woo-product-excel-importer/Classes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Drawing.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\WriterPart' not found in wp-content/plugins/woo-product-excel-importer/Classes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Style.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpOffice\\PhpSpreadsheet\\IComparable' not found in wp-content/plugins/woo-product-excel-importer/Classes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Conditional.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Ods\\WriterPart' not found in wp-content/plugins/woo-product-excel-importer/Classes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Ods/Styles.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\WriterPart' not found in wp-content/plugins/woo-product-excel-importer/Classes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/StringTable.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Style\\Supervisor' not found in wp-content/plugins/woo-product-excel-importer/Classes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Border.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Style\\Supervisor' not found in wp-content/plugins/woo-product-excel-importer/Classes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Font.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\WriterPart' not found in wp-content/plugins/woo-product-excel-importer/Classes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Worksheet\\BaseDrawing' not found in wp-content/plugins/woo-product-excel-importer/Classes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Shared\\Trend\\BestFit' not found in wp-content/plugins/woo-product-excel-importer/Classes/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/PolynomialBestFit.php:7

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, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: export products, product import, bulk import, product export, excel import...

woo-product-excel-importer/woo-product-excel-importer.php 92% from 13 tests

Analyzing the main PHP file in "WordPress Product Excel Import & Export for WooCommerce" version 5.1
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "2.2")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin64,386 lines of code in 348 files:
LanguageFilesBlank linesComment linesLines of code
PHP31713,29731,46660,536
Markdown942302,002
JSON600684
CSS414654616
JavaScript710742419
YAML314182
Bourne Again Shell16324
XML10023

PHP code 0% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,011)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity42.68
▷ Minimum class complexity1.00
▷ Maximum class complexity1,011.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces46
Interfaces10
Traits0
Classes232
▷ Abstract classes166.90%
▷ Concrete classes21693.10%
▷ Final classes00.00%
Methods2,997
▷ Static methods69023.02%
▷ Public methods2,30476.88%
▷ Protected methods852.84%
▷ Private methods60820.29%
Functions93
▷ Named functions7681.72%
▷ Anonymous functions1718.28%
Constants780
▷ Global constants30.38%
▷ Class constants77799.62%
▷ Public constants777100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/extendwp.png5.75KB3.37KB▼ 41.46%
images/default.png14.13KB5.96KB▼ 57.80%
images/woo_product_importer.png5.08KB4.91KB▼ 3.46%
images/woo_product_importer_banner.png51.28KB19.17KB▼ 62.63%
(invalid) images/woo_product_importer_premium.png19.14KB0.00KB▼ 100.00%