10% wooexim

Code Review | WOOEXIM - WooCommerce Export Import Plugin

WordPress plugin WOOEXIM - WooCommerce Export Import Plugin scored10%from 54 tests.

About plugin

  • Plugin page: wooexim
  • Plugin version: 5.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.9.3
  • WordPress version: 6.3.1
  • First release: Aug 9, 2016
  • Latest release: Apr 22, 2022
  • Number of updates: 24
  • Update frequency: every 87.1 days
  • Top authors: bulktheme (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

300+ active /38,908 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/wooexim/inc/class_wooexim_export.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; wooexim_import_export has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼55.36ms] Passed 4 tests

An overview of server-side resources used by WOOEXIM - WooCommerce Export Import Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.375.00 ▼33.25
Dashboard /wp-admin2.12 ▼1.236.73 ▼55.33
Posts /wp-admin/edit.php2.12 ▼1.245.81 ▼41.71
Add New Post /wp-admin/post-new.php2.12 ▼3.776.17 ▼91.16
Media Library /wp-admin/upload.php2.12 ▼1.116.43 ▼25.11
Dashboard /wp-admin/admin.php?page=wooexim-dashboard2.125.85
Export /wp-admin/admin.php?page=wooexim-export2.127.07
Import /wp-admin/admin.php?page=wooexim-import2.125.58

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 276 new files
Database: 1 new table, 6 new options
New tables
wp_wooexim_export_archive
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WOOEXIM - WooCommerce Export Import Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.69 ▲0.341.79 ▲0.1143.92 ▲3.86
Dashboard /wp-admin2,221 ▲405.64 ▲0.0480.54 ▼22.0184.14 ▲41.52
Posts /wp-admin/edit.php2,123 ▲231.98 ▼0.0233.32 ▼3.4334.73 ▼2.40
Add New Post /wp-admin/post-new.php1,563 ▲2823.00 ▲4.71693.01 ▲41.1050.41 ▼9.11
Media Library /wp-admin/upload.php1,429 ▲264.22 ▲0.0097.48 ▲2.9661.09 ▲17.56
Dashboard /wp-admin/admin.php?page=wooexim-dashboard1,0842.0023.1925.47
Export /wp-admin/admin.php?page=wooexim-export8022.0023.5624.57
Import /wp-admin/admin.php?page=wooexim-import1,0742.0424.9434.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wooexim/inc/class_wooexim_export.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; wooexim_import_export has a deprecated constructor
  • Zombie tables were found after uninstall: 1 table
    • wp_wooexim_export_archive
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wooexim-import
    • > Deprecated in wp-content/plugins/wooexim/inc/class_wooexim_export.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; wooexim_import_export has a deprecated constructor
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wooexim-import
    • > Deprecated in wp-content/plugins/wooexim/lib/PHPExcel/Shared/String.php+537
    Array and string offset access syntax with curly braces is deprecated
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wooexim-import
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WOOEXIM_Import::translations() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wooexim-import
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WOOEXIM_Import::admin_menu() should not be called statically
    • > GET request to /wp-admin/admin.php?page=wooexim-dashboard
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WOOEXIM_Import::wooexim_page_dashboard() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wooexim-dashboard
    • > Warning in wp-content/plugins/wooexim/inc/dashboard.php+8
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/admin.php?page=wooexim-export
    • > Notice in wp-content/plugins/wooexim/inc/wooexim-export.php+432
    Undefined index: _wpnonce
    • > GET request to /wp-admin/admin.php?page=wooexim-import
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WOOEXIM_Import::render_admin_action() should not be called statically
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wooexim-import
    • > Notice in wp-content/plugins/wooexim/inc/wooexim-import-upload.php+432
    Undefined offset: 1
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wooexim-import
    • > Notice in wp-content/plugins/wooexim/inc/wooexim-import-upload.php+426
    Undefined index: c
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wooexim-import
    • > Notice in wp-content/plugins/wooexim/inc/wooexim-import-upload.php+427
    Undefined index:
    • > GET request to /wp-admin/admin.php?page=wooexim-import
    • > Notice in wp-content/plugins/wooexim/inc/wooexim-import-upload.php+426
    Undefined index: posix

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wooexim/inc/class_wooexim_export.php
    • > /wp-content/plugins/wooexim/inc/dashboard.php
  • 116× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant PHPEXCEL_ROOT - assumed 'PHPEXCEL_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/wooexim/lib/PHPExcel/Shared/trend/trendClass.php on line 29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Shared_String' not found in wp-content/plugins/wooexim/lib/PHPExcel/Autoloader.php:36
    • > PHP Notice
      Undefined index: uploaded_file_path in wp-content/plugins/wooexim/inc/wooexim-import-ajax.php on line 6
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/wooexim/lib/PHPExcel/Shared/OLE.php on line 290
    • > PHP Warning
      Use of undefined constant PHPEXCEL_ROOT - assumed 'PHPEXCEL_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/wooexim/lib/PHPExcel/Autoloader.php on line 73
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_url() in wp-content/plugins/wooexim/inc/wooexim-import-result.php:75
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPExcel_IComparable' not found in wp-content/plugins/wooexim/lib/PHPExcel/Worksheet.php:36
    • > PHP Warning
      Use of undefined constant PHPEXCEL_ROOT - assumed 'PHPEXCEL_ROOT' (this will throw an Error in a future version of PHP) in wp-content/plugins/wooexim/lib/PHPExcel/Shared/trend/polynomialBestFitClass.php on line 29
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/wooexim/lib/PHPExcel/CachedObjectStorage/Memcache.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/wooexim/lib/PHPExcel/CachedObjectStorage/MemorySerialized.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (21 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots do not have images: #1 (Products Export Overview), #2 (Product Import Overview), #3 (Products Exported CSV FIle), #4 (Schedule Export), #5 (Export Archive), #6 (Export Preview), #7 (Import Preview), #8 (Fields Customization)
Please take inspiration from this readme.txt

wooexim/wooexim-export-import.php 85% from 13 tests

The primary PHP file in "WOOEXIM - WooCommerce Export Import Plugin" version 5.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wooexim.php" instead of "wooexim-export-import.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 190 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin55,163 lines of code in 207 files:
LanguageFilesBlank linesComment linesLines of code
PHP20011,86735,67653,688
JavaScript321289902
CSS49017573

PHP code 0% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,176)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity54.70
▷ Minimum class complexity1.00
▷ Maximum class complexity1,176.00
Average method complexity4.77
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces0
Interfaces7
Traits0
Classes184
▷ Abstract classes63.26%
▷ Concrete classes17896.74%
▷ Final classes00.00%
Methods2,741
▷ Static methods62122.66%
▷ Public methods2,23781.61%
▷ Protected methods311.13%
▷ Private methods47317.26%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants811
▷ Global constants13016.03%
▷ Class constants68183.97%
▷ Public constants681100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
12 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/accept.png0.76KB0.81KB0.00%
img/checked.png0.21KB0.20KB▼ 6.88%
img/complete.png6.17KB3.08KB▼ 50.04%
img/controls.png2.83KB1.28KB▼ 54.82%
img/overlay.png0.18KB0.15KB▼ 15.93%