10% ecommerce-product-catalog

Code Review | eCommerce Product Catalog Plugin for WordPress

WordPress plugin eCommerce Product Catalog Plugin for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: ecommerce-product...
  • Plugin version: 3.3.27
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.4
  • WordPress version: 6.3.1
  • First release: Jan 27, 2014
  • Latest release: Nov 14, 2023
  • Number of updates: 1,030
  • Update frequency: every 3.5 days
  • Top authors: impleCode (99.13%)

Code review

54 tests

User reviews

248 reviews

Install metrics

10,000+ active /1,216,180 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/ecommerce-product-catalog/templates/themes/theme-default.php+238
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence

Server metrics [RAM: ▲1.98MB] [CPU: ▼23.78ms] Passed 4 tests

A check of server-side resources used by eCommerce Product Catalog Plugin for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.89 ▲2.4335.38 ▼3.55
Dashboard /wp-admin6.02 ▲2.7141.91 ▼10.48
Posts /wp-admin/edit.php6.02 ▲2.6635.21 ▼16.39
Add New Post /wp-admin/post-new.php6.02 ▲0.1338.09 ▼64.71
Media Library /wp-admin/upload.php6.02 ▲2.7932.68 ▼1.79
Product Categories /wp-admin/edit-tags.php?taxonomy=al_product-cat&post_type=al_product6.0233.23
Products /wp-admin/edit.php?post_type=al_product6.0237.00
Getting Started /wp-admin/edit.php?post_type=al_product&page=implecode_welcome6.0237.96
Add New Product /wp-admin/post-new.php?post_type=al_product6.0233.28

Server storage [IO: ▲4.59MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 553 new files
Database: 1 new table, 24 new options
New tables
wp_ic_sessions
New WordPress options
widget_product_price_filter
widget_ic_product_size_filter
archive_names
_wp_session_cfc08ef5b7f7a0111d5854b0ba86d8c8
sample_product_id
product_archive_page_id
single_names
first_activation_version
_wp_session_list
widget_recent-posts
...

Browser metrics Passed 4 tests

eCommerce Product Catalog Plugin for WordPress: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,865 ▲10314.26 ▲0.011.91 ▲0.2442.74 ▼5.55
Dashboard /wp-admin2,256 ▲765.63 ▼0.0487.31 ▼5.0736.62 ▼10.42
Posts /wp-admin/edit.php2,163 ▲662.03 ▲0.0939.44 ▲0.8634.27 ▼1.01
Add New Post /wp-admin/post-new.php1,580 ▲5420.71 ▼2.86649.65 ▼36.9336.09 ▼13.74
Media Library /wp-admin/upload.php1,471 ▲774.13 ▼0.0597.56 ▲2.2742.81 ▲2.94
Extensions /wp-admin/extensions.php260.410.0914.60
Settings /wp-admin/product-settings.php260.410.065.65
System Status /wp-admin/system.php260.410.066.66
Product Categories /wp-admin/edit-tags.php?taxonomy=al_product-cat&post_type=al_product2,1817.49155.4080.07
Products /wp-admin/edit.php?post_type=al_product1,9522.5944.6856.47
Getting Started /wp-admin/edit.php?post_type=al_product&page=implecode_welcome1,2172.4030.3140.39
Add New Product /wp-admin/post-new.php?post_type=al_product2,21419.101,051.6082.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/ecommerce-product-catalog/templates/themes/theme-default.php+238
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence
  • Zombie tables were found after uninstall: 1 table
    • wp_ic_sessions
  • Zombie WordPress options were found after uninstall: 24 options
    • ecommerce_product_catalog_ver
    • widget_recent-posts
    • widget_product_sort_filter
    • widget_theysaidso_widget
    • _wp_session_list
    • archive_names
    • single_names
    • db_upgraded
    • archive_multiple_settings
    • widget_ic_active_filters_widget
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 24 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=al_product
    • > OPTIONS request to /index.php/wp-json/wp/v2/al_product/13?_locale=user
    • > Deprecated in wp-content/plugins/ecommerce-product-catalog/templates/themes/theme-default.php+241
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence

SRP 50% 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
The following issues need your attention
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ecommerce-product-catalog/templates/twenty/product-twentyseventeen-adder.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ecommerce-product-catalog/templates/twenty/product-twentythirteen-adder.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ecommerce-product-catalog/templates/twenty/product-twentyfourteen-adder.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ecommerce-product-catalog/templates/twenty/product-twentysixteen-adder.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ecommerce-product-catalog/templates/third-party/storefront.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/ecommerce-product-catalog/ext-comp/wp_session/wp-cli.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ecommerce-product-catalog/ext-comp/wp_session/wp-session.php:83
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ecommerce-product-catalog/templates/twenty/product-twentyfifteen-adder.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/extensions.php
    • > Network (severe)
    wp-admin/extensions.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/product-settings.php
    • > Network (severe)
    wp-admin/product-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/system.php
    • > Network (severe)
    wp-admin/system.php - Failed to load resource: the server responded with a status of 404 (Not Found)

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
Attributes that need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

ecommerce-product-catalog/ecommerce-product-catalog.php 92% from 13 tests

This is the main PHP file of "eCommerce Product Catalog Plugin for WordPress" version 3.3.27, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 305 characters long)

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
No dangerous file extensions were detected50,187 lines of code in 396 files:
LanguageFilesBlank linesComment linesLines of code
PHP2715,4137,85936,468
JavaScript711,1728677,245
CSS341,2433765,880
JSON1600486
Markdown329061
XML12047

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity32.47
▷ Minimum class complexity1.00
▷ Maximum class complexity284.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes86
▷ Abstract classes11.16%
▷ Concrete classes8598.84%
▷ Final classes11.18%
Methods933
▷ Static methods808.57%
▷ Public methods91197.64%
▷ Protected methods40.43%
▷ Private methods181.93%
Functions1,198
▷ Named functions1,19699.83%
▷ Anonymous functions20.17%
Constants36
▷ Global constants36100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
47 PNG files occupy 0.31MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/cart/css/images/warning.png1.64KB1.48KB▼ 9.80%
modules/cart/includes/customers/css/images/ui-bg_glass_95_fef1ec_1x400.png0.36KB0.15KB▼ 59.57%
modules/cart/includes/customers/css/images/ui-bg_flat_0_aaaaaa_40x100.png0.25KB0.08KB▼ 65.34%
modules/cart/includes/customers/css/images/ui-bg_flat_75_ffffff_40x100.png0.24KB0.08KB▼ 64.78%
modules/cart/includes/customers/css/images/ui-bg_glass_55_fbf9ee_1x400.png0.37KB0.12KB▼ 66.04%