71% ultimate-product-catalogue

Code Review | Ultimate Product Catalog

WordPress plugin Ultimate Product Catalog scored71%from 54 tests.

About plugin

  • Plugin page: ultimate-product-...
  • Plugin version: 5.2.13
  • PHP version: 7.4.16
  • WordPress compatibility: 7.1-6.4
  • WordPress version: 6.3.1
  • First release: Aug 21, 2013
  • Latest release: Nov 7, 2023
  • Number of updates: 1,059
  • Update frequency: every 3.5 days
  • Top authors: Rustaurius (100%)

Code review

54 tests

User reviews

226 reviews

Install metrics

7,000+ active /1,247,894 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲2.40MB] [CPU: ▲10.75ms] Passed 4 tests

Server-side resources used by Ultimate Product Catalog
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.83 ▲2.3650.89 ▲3.98
Dashboard /wp-admin5.75 ▲2.44100.00 ▲49.79
Posts /wp-admin/edit.php5.78 ▲2.4267.77 ▲22.12
Add New Post /wp-admin/post-new.php8.61 ▲2.72102.67 ▲0.96
Media Library /wp-admin/upload.php5.62 ▲2.3849.35 ▲15.92
Import /wp-admin/edit.php?post_type=upcp_product&page=ewd-upcp-import5.6249.00
Catalogs /wp-admin/edit.php?post_type=upcp_catalog5.7852.79
Add New /wp-admin/post-new.php?post_type=upcp_product8.6396.38
Product Page /wp-admin/edit.php?post_type=upcp_product&page=ewd-upcp-product-page5.6252.17
Export /wp-admin/edit.php?post_type=upcp_product&page=ewd-upcp-export5.6251.83
Dashboard /wp-admin/edit.php?post_type=upcp_product&page=ewd-upcp-dashboard5.6250.50
Tags /wp-admin/edit-tags.php?taxonomy=upcp-product-tag&post_type=upcp_product5.7158.67
About Us /wp-admin/edit.php?post_type=upcp_product&page=ewd-upcp-about-us5.6258.05
Ultimate Product Catalog - Welcome! /wp-admin/index.php?page=ewd-upcp-getting-started5.6148.61
Categories /wp-admin/edit-tags.php?taxonomy=upcp-product-category&post_type=upcp_product5.7152.96

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 1,029 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-posts
ewd-upcp-permission-level
widget_recent-comments
can_compress_scripts
widget_ewd_upcp_display_recent_products
widget_ewd_upcp_display_product_list
widget_ewd_upcp_display_random_products
widget_ewd_upcp_display_popular_products
db_upgraded
ewd-upcp-installation-time
...

Browser metrics Passed 4 tests

A check of browser resources used by Ultimate Product Catalog
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲14014.33 ▲0.051.81 ▲0.1737.57 ▼5.29
Dashboard /wp-admin2,276 ▲965.65 ▼0.0397.05 ▼2.5841.16 ▼6.58
Posts /wp-admin/edit.php2,178 ▲782.04 ▲0.1039.97 ▲3.7436.32 ▲4.67
Add New Post /wp-admin/post-new.php1,763 ▲23724.77 ▲1.83731.94 ▲38.4440.33 ▼13.26
Media Library /wp-admin/upload.php1,481 ▲814.24 ▲0.0399.93 ▼3.9744.13 ▼0.47
Import /wp-admin/edit.php?post_type=upcp_product&page=ewd-upcp-import1,1083.3956.2640.76
Catalogs /wp-admin/edit.php?post_type=upcp_catalog1,3903.5752.8437.55
Add New /wp-admin/post-new.php?post_type=upcp_product1,79916.78864.4242.84
Product Page /wp-admin/edit.php?post_type=upcp_product&page=ewd-upcp-product-page1,1053.3444.8632.08
Export /wp-admin/edit.php?post_type=upcp_product&page=ewd-upcp-export1,1083.3246.0232.32
Dashboard /wp-admin/edit.php?post_type=upcp_product&page=ewd-upcp-dashboard1,4753.3343.64110.48
Tags /wp-admin/edit-tags.php?taxonomy=upcp-product-tag&post_type=upcp_product1,5693.6152.6138.63
About Us /wp-admin/edit.php?post_type=upcp_product&page=ewd-upcp-about-us1,4783.3844.4562.09
Ultimate Product Catalog - Welcome! /wp-admin/index.php?page=ewd-upcp-getting-started1,5033.2647.9331.00
Categories /wp-admin/edit-tags.php?taxonomy=upcp-product-category&post_type=upcp_product1,6123.6251.9038.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 13 options in the database
    • widget_ewd_upcp_display_random_products
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_ewd_upcp_display_search_bar
    • widget_ewd_upcp_display_popular_products
    • widget_ewd_upcp_display_recent_products
    • ewd-upcp-permission-level
    • ewd-upcp-installation-time
    • widget_theysaidso_widget
    • ...

Smoke tests 25% 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ultimate-product-catalogue/ewd-upcp-templates/single-product-thumbnails-next-button.php
    • > /wp-content/plugins/ultimate-product-catalogue/ewd-upcp-templates/catalog-category-footer.php
    • > /wp-content/plugins/ultimate-product-catalogue/ewd-upcp-templates/catalog-product-comparison.php
    • > /wp-content/plugins/ultimate-product-catalogue/ewd-upcp-templates/single-product-thumbnails-previous-button.php
  • 403× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Exception' not found in wp-content/plugins/ultimate-product-catalogue/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Exception.php:7
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/ultimate-product-catalogue/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Arabic.php on line 9
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/ultimate-product-catalogue/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Poisson.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ultimate-product-catalogue/ewd-upcp-templates/single-product-custom-element-subcategories-label.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ultimate-product-catalogue/ewd-upcp-templates/single-product-custom-element-price.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Cell\\DefaultValueBinder' not found in wp-content/plugins/ultimate-product-catalogue/lib/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/AdvancedValueBinder.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ultimate-product-catalogue/ewd-upcp-templates/catalog-product-sale-price.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'sapAdminPageSetting_2_6_13' not found in wp-content/plugins/ultimate-product-catalogue/lib/simple-admin-pages/classes/AdminPageSetting.Count.class.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ultimate-product-catalogue/ewd-upcp-templates/single-product-custom-element-additional-images.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/ultimate-product-catalogue/ewd-upcp-templates/catalog-product-tags.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/index.php?page=ewd-upcp-getting-started
    • > Network (severe)
    wp-content/plugins/ultimate-product-catalogue/assets/css/admin.css?ver=5.2.13 - 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

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
Attributes that need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

ultimate-product-catalogue/ultimate-product-catalogue.php 92% from 13 tests

The main file in "Ultimate Product Catalog" v. 5.2.13 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 148 characters long)

Code Analysis 95% from 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 plugin117,659 lines of code in 843 files:
LanguageFilesBlank linesComment linesLines of code
PHP70321,73042,30289,992
CSS235994798,976
PO File133,7505,5098,798
JavaScript712,1181,4777,377
Markdown1041101,855
SVG13120286
JSON300245
YAML5191284
Bourne Again Shell16324
XML10022

PHP code 0% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,020)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 333)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity24.76
▷ Minimum class complexity1.00
▷ Maximum class complexity1,020.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity333.00
Code structure
Namespaces73
Interfaces14
Traits1
Classes565
▷ Abstract classes305.31%
▷ Concrete classes53594.69%
▷ Final classes20.37%
Methods5,430
▷ Static methods1,62029.83%
▷ Public methods4,05374.64%
▷ Protected methods2224.09%
▷ Private methods1,15521.27%
Functions77
▷ Named functions2025.97%
▷ Anonymous functions5774.03%
Constants1,413
▷ Global constants100.71%
▷ Class constants1,40399.29%
▷ Public constants1,23688.10%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
60 PNG files occupy 2.09MB with 0.91MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/premium-screenshots/seo.png71.40KB23.66KB▼ 66.86%
lib/simple-admin-pages/img/options-asset-star.png0.78KB0.32KB▼ 58.92%
assets/img/question_mark.png0.66KB0.40KB▼ 38.48%
lib/simple-admin-pages/img/options-asset-lock.png1.05KB0.50KB▼ 52.28%
assets/img/Related_FAQ.png154.30KB152.71KB▼ 1.03%