10% ecommerce-shopping-cart-by-inventorycom

Code Review | eCommerce Shopping Cart by Inventory.com

WordPress plugin eCommerce Shopping Cart by Inventory.com scored10%from 54 tests.

About plugin

  • Plugin page: ecommerce-shoppin...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.8
  • WordPress version: 6.3.1
  • First release: Dec 20, 2013
  • Latest release: Jan 27, 2014
  • Number of updates: 13
  • Update frequency: every 3.0 days
  • Top authors: inventory (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /7,131 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/ecommerce-shopping-cart-by-inventorycom/lib/helpers/ec_helper_functions.php+210
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.55ms] Passed 4 tests

This is a short check of server-side resources used by eCommerce Shopping Cart by Inventory.com
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.51 ▼8.99
Dashboard /wp-admin3.31 ▲0.0046.98 ▼2.52
Posts /wp-admin/edit.php3.36 ▲0.0046.59 ▼2.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.61 ▼16.55
Media Library /wp-admin/upload.php3.23 ▲0.0034.81 ▲3.73

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 91 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for eCommerce Shopping Cart by Inventory.com
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.27 ▼1.334.56 ▲2.9141.82 ▼3.54
Dashboard /wp-admin2,206 ▲184.89 ▼0.97101.77 ▼15.4442.57 ▲0.47
Posts /wp-admin/edit.php2,089 ▲31.97 ▼0.0937.62 ▼0.4835.17 ▲1.29
Add New Post /wp-admin/post-new.php1,514 ▼2217.78 ▼5.63650.25 ▼48.7152.54 ▲0.32
Media Library /wp-admin/upload.php1,388 ▲34.15 ▼0.08101.49 ▲0.2744.73 ▼2.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/ecommerce-shopping-cart-by-inventorycom/uninstall.php+31
    count(): Parameter must be an array or an object that implements Countable
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 27× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ecommerce-shopping-cart-by-inventorycom/plugin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ecommerce-shopping-cart-by-inventorycom/lib/widgets/ECFrontProducts.widget.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ecommerce-shopping-cart-by-inventorycom/views/frontend/cart-page.tpl.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ecommerce-shopping-cart-by-inventorycom/templates/front-page.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ecommerce-shopping-cart-by-inventorycom/templates/parts/single-page-tabs.tpl.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ecommerce-shopping-cart-by-inventorycom/config.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ECShipping' not found in wp-content/plugins/ecommerce-shopping-cart-by-inventorycom/lib/shipping/erply.shipping.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ecommerce-shopping-cart-by-inventorycom/views/frontend/register-page.tpl.php:2
    • > PHP Notice
      Undefined variable: posts in wp-content/plugins/ecommerce-shopping-cart-by-inventorycom/views/frontend/search-page-tpl.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ecommerce-shopping-cart-by-inventorycom/lib/widgets/ECCategories.widget.php:2

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

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 23 tag instead of maximum 10
You can look at the official readme.txt

ecommerce-shopping-cart-by-inventorycom/plugin.php 92% from 13 tests

The primary PHP file in "eCommerce Shopping Cart by Inventory.com" version 1.0.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ecommerce-shopping-cart-by-inventorycom.php" instead of "plugin.php")

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 plugin8,015 lines of code in 73 files:
LanguageFilesBlank linesComment linesLines of code
PHP559078945,285
JavaScript620545997
Sass3468731
CSS510720512
PO File2218465482
Ruby16117
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity17.89
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes37
▷ Abstract classes00.00%
▷ Concrete classes37100.00%
▷ Final classes00.00%
Methods250
▷ Static methods145.60%
▷ Public methods20381.20%
▷ Protected methods00.00%
▷ Private methods4718.80%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/js/swipebox/img/icons.png0.71KB0.43KB▼ 39.64%