64% post-type-x

Code Review | Product Catalog Simple

WordPress plugin Product Catalog Simple scored64%from 54 tests.

About plugin

  • Plugin page: post-type-x
  • Plugin version: 1.7.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.4
  • WordPress version: 6.3.1
  • First release: Oct 8, 2015
  • Latest release: Nov 14, 2023
  • Number of updates: 158
  • Update frequency: every 18.7 days
  • Top authors: impleCode (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /62,668 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.96MB] [CPU: ▼24.77ms] Passed 4 tests

This is a short check of server-side resources used by Product Catalog Simple
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.88 ▲2.4130.61 ▼9.68
Dashboard /wp-admin6.00 ▲2.6636.38 ▼29.58
Posts /wp-admin/edit.php6.01 ▲2.6440.15 ▼8.88
Add New Post /wp-admin/post-new.php6.01 ▲0.1138.59 ▼50.93
Media Library /wp-admin/upload.php6.01 ▲2.7739.70 ▲4.35

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 312 new files
Database: 1 new table, 16 new options
New tables
wp_ic_sessions
New WordPress options
widget_ic_product_size_filter
widget_recent-posts
theysaidso_admin_options
db_upgraded
IC_EPC_install
widget_theysaidso_widget
_wp_session_list
_wp_session_b04a1ddbb9e701f9cd1f39086f2e078c
widget_ic_active_filters_widget
widget_recent-comments
...

Browser metrics Passed 4 tests

Product Catalog Simple: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲11514.32 ▼0.021.71 ▲0.0441.01 ▼2.45
Dashboard /wp-admin2,256 ▲795.58 ▼0.1194.37 ▼3.7942.27 ▼7.48
Posts /wp-admin/edit.php2,163 ▲631.98 ▼0.0539.74 ▲3.3333.97 ▲0.22
Add New Post /wp-admin/post-new.php1,734 ▲20823.64 ▲0.53613.59 ▼56.5534.68 ▼18.44
Media Library /wp-admin/upload.php1,471 ▲744.17 ▼0.0498.58 ▼1.0141.34 ▲0.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/post-type-x/core/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: 16 options
    • widget_product_sort_filter
    • widget_ic_product_size_filter
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • IC_EPC_install
    • db_upgraded
    • widget_product_category_filter
    • widget_product_search
    • widget_product_categories
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
  • 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/post-type-x/core/templates/twenty/product-twentyfifteen-adder.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/post-type-x/core/templates/twenty/product-twentyseventeen-adder.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-type-x/core/ext-comp/wp_session/wp-session.php:83
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/post-type-x/core/ext-comp/wp_session/wp-cli.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/post-type-x/core/templates/twenty/product-twentysixteen-adder.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/post-type-x/core/templates/third-party/storefront.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/post-type-x/core/templates/twenty/product-twentythirteen-adder.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/post-type-x/core/templates/twenty/product-twentyfourteen-adder.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 38 tag instead of maximum 10
  • Plugin Name: You should set the name of your plugin on the first line ( === post-type-x === )
The official readme.txt is a good inspiration

post-type-x/post-type-x.php Passed 13 tests

The principal PHP file in "Product Catalog Simple" v. 1.7.7 is loaded by WordPress automatically on each request
125 characters long description:
A minimalistic, modular catalog tool which comes with fully customizable, responsive front-end design, search and categories.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected35,395 lines of code in 234 files:
LanguageFilesBlank linesComment linesLines of code
PHP1463,4874,64523,541
JavaScript591,1628147,062
CSS149072604,341
JSON1300414
XML12032
Markdown1405

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity35.88
▷ Minimum class complexity1.00
▷ Maximum class complexity284.00
Average method complexity3.76
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes11.96%
▷ Concrete classes5098.04%
▷ Final classes12.00%
Methods646
▷ Static methods416.35%
▷ Public methods62496.59%
▷ Protected methods40.62%
▷ Private methods182.79%
Functions665
▷ Named functions66499.85%
▷ Anonymous functions10.15%
Constants34
▷ Global constants34100.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
23 PNG files occupy 0.23MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/img/implecode.png11.70KB5.04KB▼ 56.91%
core/js/colorbox/images/border1.png1.03KB0.82KB▼ 20.34%
core/img/example-feedback.png44.77KB14.08KB▼ 68.56%
core/js/chosen/chosen-sprite.png0.53KB0.88KB0.00%
core/css/images/doc.png4.91KB1.64KB▼ 66.49%