83% jigoshop-csv-importer

Code Review | Jigoshop CSV Importer

WordPress plugin Jigoshop CSV Importer scored83%from 54 tests.

About plugin

  • Plugin page: jigoshop-csv-impo...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 24, 2013
  • Latest release: Mar 17, 2021
  • Number of updates: 26
  • Update frequency: every 107.4 days
  • Top authors: mag_oberon (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /6,193 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.01MB] [CPU: ▼3.64ms] Passed 4 tests

Server-side resources used by Jigoshop CSV Importer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.19 ▼0.60
Dashboard /wp-admin3.31 ▲0.0149.11 ▲1.77
Posts /wp-admin/edit.php3.36 ▲0.0144.36 ▼0.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.27 ▼14.94
Media Library /wp-admin/upload.php3.24 ▲0.0133.37 ▲2.59

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Jigoshop CSV Importer: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲1914.67 ▲0.301.64 ▼0.1144.11 ▲3.23
Dashboard /wp-admin2,214 ▲375.62 ▼0.0386.76 ▲1.0542.66 ▼2.34
Posts /wp-admin/edit.php2,119 ▲192.03 ▲0.0534.87 ▼3.2932.47 ▼1.57
Add New Post /wp-admin/post-new.php1,539 ▲1323.46 ▲0.34670.52 ▲18.8059.17 ▲0.15
Media Library /wp-admin/upload.php1,410 ▲104.15 ▼0.0293.84 ▼7.0041.97 ▼1.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/jigoshop-csv-importer/admin/Jigoshop-CSV-Importer.php:334
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jigoshop-csv-importer/CSV-Importer-For-Jigoshop.php:30

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

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Screenshot #1 (admin area) image required
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Requires at least: Invalid plugin version format
The official readme.txt might help

jigoshop-csv-importer/CSV-Importer-For-Jigoshop.php 92% from 13 tests

The main PHP script in "Jigoshop CSV Importer" version 1.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("jigoshop-csv-importer.php" instead of "CSV-Importer-For-Jigoshop.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin538 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25154460
PO File1323378

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity2.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png24.52KB13.95KB▼ 43.11%