72% easy-product-catalog

Code Review | Easy Product Catalog

WordPress plugin Easy Product Catalog scored72%from 54 tests.

About plugin

  • Plugin page: easy-product-catalog
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.4
  • WordPress version: 6.3.1
  • First release: Jul 7, 2020
  • Latest release: Jul 7, 2020
  • Number of updates: 2
  • Update frequency: every 12.5 days
  • Top authors: corefortress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,640 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
Install script ran successfully

Server metrics [RAM: ▲1.62MB] [CPU: ▲8.73ms] Passed 4 tests

An overview of server-side resources used by Easy Product Catalog
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.97 ▲1.5056.90 ▲12.70
Dashboard /wp-admin4.97 ▲1.6664.00 ▲7.81
Posts /wp-admin/edit.php5.03 ▲1.6767.48 ▲10.41
Add New Post /wp-admin/post-new.php7.68 ▲1.79110.57 ▲4.01
Media Library /wp-admin/upload.php4.89 ▲1.6661.48 ▲16.93
Filters /wp-admin/edit-tags.php?taxonomy=coreft-catalog-filters&post_type=coreft-products4.8956.56
Categories /wp-admin/edit-tags.php?taxonomy=coreft-catalog-cats&post_type=coreft-products4.8950.60
Store Settings /wp-admin/admin.php?page=coreft-catalog-store6.3461.78
Attributes /wp-admin/edit-tags.php?taxonomy=coreft-catalog-attributes&post_type=coreft-products4.8951.07
Products /wp-admin/edit.php?post_type=coreft-products4.9451.06
Rating Bars PRO /wp-admin/admin.php?page=coreft-catalog-rating-bars4.8544.68
Comparisons PRO /wp-admin/admin.php?page=coreft-catalog-comparisons4.8543.20
Import/Export /wp-admin/admin.php?page=coreft-catalog-import4.8543.09
Groups /wp-admin/edit-tags.php?taxonomy=coreft-catalog-groups&post_type=coreft-products4.8949.18
Catalog Settings /wp-admin/admin.php?page=coreft-catalog-settings4.9151.94

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 122 new files
Database: no new tables, 24 new options
New WordPress options
coreft-catalog-site-id
widget_theysaidso_widget
coreft-catalog-affiliates
coreft-catalog-settings
widget_coreft_catalog_comparisons
widget_coreft_catalog_new_arrivals
widget_recent-comments
coreft-catalog-gallery
coreft-catalog-store-general
coreft-catalog-permalinks
...

Browser metrics Passed 4 tests

Easy Product Catalog: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,998 ▲23713.90 ▼0.4611.45 ▲9.6345.15 ▼0.14
Dashboard /wp-admin2,262 ▲855.59 ▼0.0688.43 ▼2.5864.46 ▲20.70
Posts /wp-admin/edit.php2,182 ▲821.97 ▲0.0036.64 ▼5.2533.69 ▼6.90
Add New Post /wp-admin/post-new.php1,755 ▲22124.46 ▲6.50719.01 ▲115.4067.80 ▲3.58
Media Library /wp-admin/upload.php1,473 ▲704.12 ▼0.00108.03 ▲2.7369.44 ▲22.92
Filters /wp-admin/edit-tags.php?taxonomy=coreft-catalog-filters&post_type=coreft-products1,5633.3246.6479.01
Categories /wp-admin/edit-tags.php?taxonomy=coreft-catalog-cats&post_type=coreft-products1,7123.3745.1488.14
Store Settings /wp-admin/admin.php?page=coreft-catalog-store16,4313.5667.12114.37
Attributes /wp-admin/edit-tags.php?taxonomy=coreft-catalog-attributes&post_type=coreft-products1,6363.3242.1475.72
Products /wp-admin/edit.php?post_type=coreft-products1,2961.9632.4438.16
Rating Bars PRO /wp-admin/admin.php?page=coreft-catalog-rating-bars8522.1726.7632.55
Comparisons PRO /wp-admin/admin.php?page=coreft-catalog-comparisons8672.0027.1028.50
Import/Export /wp-admin/admin.php?page=coreft-catalog-import9681.6824.1133.15
Groups /wp-admin/edit-tags.php?taxonomy=coreft-catalog-groups&post_type=coreft-products3,1493.8360.7786.43
Catalog Settings /wp-admin/admin.php?page=coreft-catalog-settings3,5783.4452.4492.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 24 options
    • coreft-catalog-store-images
    • coreft-catalog-settings
    • coreft-catalog-site-id
    • widget_coreft_catalog_comparisons
    • coreft_catalog_version
    • coreft-catalog-affiliates
    • coreft-catalog-gallery
    • coreft_catalog_db_version
    • theysaidso_admin_options
    • coreft_catalog_installed
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=coreft-catalog-groups&post_type=coreft-products
    • > User deprecated in wp-includes/functions.php+5828
    Hook add_tag_form is deprecated since version 3.0.0! Use {$taxonomy}_add_form instead.

SRP 0% 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
The following issues need your attention
  • 30× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/easy-product-catalog/views/parts/single-gallery.php
    • > /wp-content/plugins/easy-product-catalog/src/coreft-catalog-store-functions.php
    • > /wp-content/plugins/easy-product-catalog/views/coreft-comparisons.php
    • > /wp-content/plugins/easy-product-catalog/views/parts/single-videos.php
    • > /wp-content/plugins/easy-product-catalog/src/store/tab-general.php
    • > /wp-content/plugins/easy-product-catalog/views/parts/loop-products.php
    • > /wp-content/plugins/easy-product-catalog/src/coreft-catalog-import-export.php
    • > /wp-content/plugins/easy-product-catalog/views/parts/single-features.php
    • > /wp-content/plugins/easy-product-catalog/views/parts/single-offers.php
    • > /wp-content/plugins/easy-product-catalog/views/coreft-catalog-archive-cat.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-product-catalog/coreft-catalog.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_transient() in wp-content/plugins/easy-product-catalog/views/pro-notice.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/easy-product-catalog/coreft-catalog.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: catalog, price, product

easy-product-catalog/coreft-catalog.php 85% from 13 tests

"Easy Product Catalog" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/langs")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-product-catalog.php" instead of "coreft-catalog.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
Success! There were no dangerous files found in this plugin21,663 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
PHP331,4131,03911,925
CSS173051635,701
JSON1003,118
JavaScript713748608
SVG12990311

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity45.80
▷ Minimum class complexity7.00
▷ Maximum class complexity183.00
Average method complexity4.93
▷ Minimum method complexity1.00
▷ Maximum method complexity88.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods114
▷ Static methods7162.28%
▷ Public methods10188.60%
▷ Protected methods43.51%
▷ Private methods97.89%
Functions143
▷ Named functions14097.90%
▷ Anonymous functions32.10%
Constants7
▷ Global constants571.43%
▷ Class constants228.57%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
55 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/letters/x.png3.31KB1.45KB▼ 56.23%
images/next@2x.png4.14KB0.98KB▼ 76.27%
images/letters/o.png3.90KB1.36KB▼ 65.16%
images/letters/n.png2.31KB0.88KB▼ 62.05%
images/letters/u.png2.54KB0.83KB▼ 67.12%