58% products-csv-importer-for-woocommerce

Code Review | Products CSV Importer for Woocommerce

WordPress plugin Products CSV Importer for Woocommerce scored58%from 54 tests.

About plugin

  • Plugin page: products-csv-impo...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 22, 2017
  • Latest release: Feb 24, 2017
  • Number of updates: 11
  • Update frequency: every 2.6 days
  • Top authors: jonboss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,000 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼35.70ms] Passed 4 tests

Server-side resources used by Products CSV Importer for Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.21 ▲1.43
Dashboard /wp-admin3.00 ▼0.3121.82 ▼25.20
Posts /wp-admin/edit.php3.00 ▼0.3622.57 ▼29.32
Add New Post /wp-admin/post-new.php3.00 ▼2.8922.82 ▼76.59
Media Library /wp-admin/upload.php3.00 ▼0.2325.24 ▼11.68

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: 1 new table, 6 new options
New tables
wp_wpci_id_associations
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Products CSV Importer for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.24 ▼0.902.06 ▼0.0445.54 ▲1.21
Dashboard /wp-admin2,226 ▲384.84 ▼1.01119.10 ▲6.7344.33 ▲1.37
Posts /wp-admin/edit.php2,112 ▲231.99 ▼0.0135.99 ▼2.2439.69 ▲5.66
Add New Post /wp-admin/post-new.php1,534 ▼023.20 ▼0.31651.46 ▼7.6555.18 ▲1.80
Media Library /wp-admin/upload.php1,414 ▲234.21 ▲0.02101.91 ▼2.9344.02 ▲0.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_wpci_id_associations
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/products-csv-importer-for-woocommerce/views/wpci-options-view.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/products-csv-importer-for-woocommerce/includes/wpci-upload-csv.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/products-csv-importer-for-woocommerce/includes/wpci-import-csv-action.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/products-csv-importer-for-woocommerce/products-csv-importer.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/products-csv-importer-for-woocommerce/views/wpci-importer-view.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Requires at least: Invalid plugin version format
Please take inspiration from this readme.txt

products-csv-importer-for-woocommerce/products-csv-importer.php 92% from 13 tests

This is the main PHP file of "Products CSV Importer for Woocommerce" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("products-csv-importer-for-woocommerce.php" instead of "products-csv-importer.php")

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin662 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP77995562
CSS10058
JavaScript14042

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity22.00
▷ Minimum class complexity1.00
▷ Maximum class complexity43.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods35
▷ Static methods35100.00%
▷ Public methods2777.14%
▷ Protected methods00.00%
▷ Private methods822.86%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.23MB with 0.17MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png63.43KB16.15KB▼ 74.54%
assets/screenshot-1.png100.16KB27.51KB▼ 72.53%
assets/screenshot-3.png72.35KB18.92KB▼ 73.85%