78% catalog-mode-pricing-enquiry-forms-promotions

Code Review | WooCommerce Catalog Mode - Product Pricing, Enquiry Forms & Promotions

WordPress plugin WooCommerce Catalog Mode - Product Pricing, Enquiry Forms & Promotions scored78%from 54 tests.

About plugin

  • Plugin page: catalog-mode-pric...
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Feb 14, 2023
  • Latest release: Nov 6, 2023
  • Number of updates: 21
  • Update frequency: every 12.6 days
  • Top authors: sundayfanz (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /2,837 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.22MB] [CPU: ▼6.81ms] Passed 4 tests

A check of server-side resources used by WooCommerce Catalog Mode - Product Pricing, Enquiry Forms & Promotions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.22 ▼2.12
Dashboard /wp-admin3.59 ▲0.2954.07 ▲3.12
Posts /wp-admin/edit.php3.70 ▲0.3547.25 ▲1.67
Add New Post /wp-admin/post-new.php6.19 ▲0.3080.48 ▼25.87
Media Library /wp-admin/upload.php3.52 ▲0.2935.04 ▼0.91

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

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

Browser metrics Passed 4 tests

WooCommerce Catalog Mode - Product Pricing, Enquiry Forms & Promotions: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲7613.68 ▼0.661.52 ▼0.5243.33 ▼1.24
Dashboard /wp-admin2,268 ▲875.29 ▼0.3794.70 ▼8.9940.04 ▼1.27
Posts /wp-admin/edit.php2,180 ▲832.51 ▲0.4944.41 ▲5.1532.64 ▼4.04
Add New Post /wp-admin/post-new.php1,596 ▲6123.63 ▲5.19663.90 ▲22.7333.92 ▼39.09
Media Library /wp-admin/upload.php1,470 ▲674.92 ▲0.73102.33 ▼1.2741.54 ▼2.55

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/catalog-mode-pricing-enquiry-forms-promotions/framework/reon/inc/controls/controls-simple-repeater/view-head.php
    • > /wp-content/plugins/catalog-mode-pricing-enquiry-forms-promotions/framework/reon/inc/optionpage/option-page-content-footer.php
    • > /wp-content/plugins/catalog-mode-pricing-enquiry-forms-promotions/framework/reon/inc/optionpage/option-page-content-header.php
  • 87× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ReonUtil' not found in wp-content/plugins/catalog-mode-pricing-enquiry-forms-promotions/framework/reon/inc/optionpage/option-page-aside-details.php:19
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/catalog-mode-pricing-enquiry-forms-promotions/framework/reon/inc/optionpage/option-page-aside-details.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/catalog-mode-pricing-enquiry-forms-promotions/framework/reon/inc/controls/controls-repeater/view.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/catalog-mode-pricing-enquiry-forms-promotions/framework/reon/inc/controls/controls-simple-repeater/view.php:1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/catalog-mode-pricing-enquiry-forms-promotions/framework/reon/inc/optionpage/option-page-aside-menu.php on line 14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/catalog-mode-pricing-enquiry-forms-promotions/framework/reon/inc/controls/controls-simple-repeater/view-section.php on line 28
    • > PHP Notice
      Undefined variable: page in wp-content/plugins/catalog-mode-pricing-enquiry-forms-promotions/framework/reon/inc/optionpage/option-page-content-header.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/catalog-mode-pricing-enquiry-forms-promotions/framework/reon/inc/controls/controls-columns-field/view.php:1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/catalog-mode-pricing-enquiry-forms-promotions/framework/reon/inc/controls/controls-simple-repeater/view-section.php on line 28
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/catalog-mode-pricing-enquiry-forms-promotions/framework/reon/inc/controls/controls-repeater/view-section-head.php on line 42

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

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

catalog-mode-pricing-enquiry-forms-promotions/catalog-mode-pricing-enquiry-forms-promotions.php 92% from 13 tests

"WooCommerce Catalog Mode - Product Pricing, Enquiry Forms & Promotions" version 1.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected70,219 lines of code in 430 files:
LanguageFilesBlank linesComment linesLines of code
PHP2237,12317220,336
JavaScript1204,1521,90218,115
CSS315,94815514,396
Sass36812719,495
LESS18548716,888
PO File1435700935
Markdown127054

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity13.45
▷ Minimum class complexity1.00
▷ Maximum class complexity184.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes173
▷ Abstract classes00.00%
▷ Concrete classes173100.00%
▷ Final classes00.00%
Methods1,076
▷ Static methods66962.17%
▷ Public methods67162.36%
▷ Protected methods00.00%
▷ Private methods40537.64%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
main/assets/images/aside_bg.png14.75KB7.11KB▼ 51.81%
main/assets/images/aside_logo.png2.26KB0.74KB▼ 67.26%