89% import-woocommerce

Code Review | Import WooCommerce

WordPress plugin Import WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: import-woocommerce
  • Plugin version: 1.9
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 19, 2015
  • Latest release: Nov 9, 2023
  • Number of updates: 53
  • Update frequency: every 54.4 days
  • Top authors: smackcoders (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

5,000+ active /104,903 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 gracefully, with no errors

Server metrics [RAM: ▲0.54MB] [CPU: ▼3.63ms] Passed 4 tests

This is a short check of server-side resources used by Import WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.02 ▲0.5640.48 ▲3.19
Dashboard /wp-admin3.85 ▲0.5146.83 ▼13.89
Posts /wp-admin/edit.php3.97 ▲0.6151.09 ▲3.63
Add New Post /wp-admin/post-new.php6.43 ▲0.5595.64 ▼6.96
Media Library /wp-admin/upload.php3.78 ▲0.5540.02 ▲3.13

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Import WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.67 ▲0.321.59 ▼0.1537.58 ▼2.46
Dashboard /wp-admin2,192 ▲155.53 ▼0.1392.05 ▼2.4239.39 ▼3.45
Posts /wp-admin/edit.php2,103 ▼01.95 ▲0.0041.10 ▼0.4837.11 ▲1.34
Add New Post /wp-admin/post-new.php1,526 ▼1022.91 ▼0.12674.03 ▼5.2961.75 ▲16.08
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.0597.27 ▼7.0741.59 ▼1.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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 SRP test was a success

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

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Screenshots: Add images for these screenshots: #1 (CSV Upload section.), #2 (Product feed mapping section.), #3 (Import configuration section.), #4 (Log section with both Admin and Web views.)
You can take inspiration from this readme.txt

import-woocommerce/import-woocommerce.php 92% from 13 tests

The principal PHP file in "Import WooCommerce" v. 1.9 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin2,999 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP103412412,999

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 489)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity75.40
▷ Minimum class complexity2.00
▷ Maximum class complexity490.00
Average method complexity13.18
▷ Minimum method complexity1.00
▷ Maximum method complexity489.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods62
▷ Static methods2032.26%
▷ Public methods62100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.34MB with 0.24MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png65.35KB18.82KB▼ 71.20%
screenshot-1.png70.91KB19.74KB▼ 72.16%
screenshot-4.png96.25KB25.06KB▼ 73.96%
screenshot-2.png114.99KB33.48KB▼ 70.88%