84% jigoshop-mini-cart

Code Review | Jigoshop Mini Cart

WordPress plugin Jigoshop Mini Cart scored84%from 54 tests.

About plugin

  • Plugin page: jigoshop-mini-cart
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 1, 2014
  • Latest release: Jun 1, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: tormorten (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,505 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.14MB] [CPU: ▼11.75ms] Passed 4 tests

This is a short check of server-side resources used by Jigoshop Mini Cart
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.57 ▼5.52
Dashboard /wp-admin3.23 ▼0.0735.73 ▼17.58
Posts /wp-admin/edit.php3.30 ▼0.0641.50 ▼9.54
Add New Post /wp-admin/post-new.php5.47 ▼0.4280.44 ▼14.35
Media Library /wp-admin/upload.php3.23 ▲0.0035.06 ▼3.85

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Jigoshop Mini Cart: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.13 ▼0.241.70 ▼0.3342.69 ▼1.14
Dashboard /wp-admin2,243 ▲665.63 ▲0.0591.00 ▼1.5540.67 ▲2.46
Posts /wp-admin/edit.php2,155 ▲522.12 ▲0.1044.71 ▲0.2939.70 ▲4.31
Add New Post /wp-admin/post-new.php1,571 ▲4523.28 ▲0.41667.20 ▼59.2952.87 ▼12.44
Media Library /wp-admin/upload.php1,451 ▲514.27 ▲0.13101.93 ▼13.9345.46 ▼3.07

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/jigoshop-mini-cart/jigoshop-mini-cart.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (The cart before it is opened.), #2 (The cart after it is opened.)
Please take inspiration from this readme.txt

jigoshop-mini-cart/jigoshop-mini-cart.php Passed 13 tests

Analyzing the main PHP file in "Jigoshop Mini Cart" version 0.1
49 characters long description:
A mini version of the shopping cart for Jigoshop.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin298 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP19169173
CSS10361
LESS11355
JavaScript1709

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
3 PNG files occupy 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png22.61KB7.06KB▼ 68.78%
screenshot-2.png42.28KB15.69KB▼ 62.89%
cart.png2.98KB0.46KB▼ 84.51%