89% import-items-from-csv-to-existing-orders

Code Review | Import items from csv to Existing Orders for WooCommerce

WordPress plugin Import items from csv to Existing Orders for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: import-items-from...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-5.2.1
  • WordPress version: 6.3.1
  • First release: Aug 23, 2019
  • Latest release: Sep 11, 2019
  • Number of updates: 12
  • Update frequency: every 1.7 days
  • Top authors: jcodex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /491 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.62MB] [CPU: ▼15.98ms] Passed 4 tests

An overview of server-side resources used by Import items from csv to Existing Orders for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0745.39 ▼1.04
Dashboard /wp-admin3.36 ▲0.0649.38 ▼1.28
Posts /wp-admin/edit.php3.48 ▲0.1256.36 ▲0.69
Add New Post /wp-admin/post-new.php3.21 ▼2.6838.46 ▼60.68
Media Library /wp-admin/upload.php3.29 ▲0.0636.34 ▼0.93

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
recovery_mode_email_last_sent
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Import items from csv to Existing Orders for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6813.57 ▼0.811.90 ▼0.1541.28 ▼3.32
Dashboard /wp-admin2,217 ▲265.03 ▲0.16109.30 ▼6.0639.69 ▼2.56
Posts /wp-admin/edit.php2,108 ▲222.33 ▲0.2839.65 ▼0.3735.88 ▲2.73
Add New Post /wp-admin/post-new.php45 ▼1,4970.44 ▼17.830.08 ▼618.7010.16 ▼51.06
Media Library /wp-admin/upload.php1,402 ▲144.49 ▲0.27138.37 ▲26.7047.86 ▲3.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Button to Add order in WooCommerce orders screen), #2 (Button To import items from csv), #3 (Confirmation popup before import items), #4 (Result after save items, items are added into the order)
Please take inspiration from this readme.txt

import-items-from-csv-to-existing-orders/import-order-items-from-csv.php 77% from 13 tests

The main PHP file in "Import items from csv to Existing Orders for WooCommerce" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "2.3")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("import-items-from-csv-to-existing-orders.php" instead of "import-order-items-from-csv.php")

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
There were no executable files found in this plugin1,585 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS133501,142
PHP411365443

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity8.33
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1184.62%
▷ Protected methods00.00%
▷ Private methods215.38%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.29MB with 0.18MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png134.28KB51.28KB▼ 61.81%
screenshot-2.png46.27KB18.62KB▼ 59.76%
screenshot-3.png45.56KB18.50KB▼ 59.39%
screenshot-1.png71.63KB27.48KB▼ 61.63%