78% enquiry-quotation-for-woocommerce

Code Review | Product Enquiry for WooCommerce, WooCommerce product catalog

WordPress plugin Product Enquiry for WooCommerce, WooCommerce product catalog scored78%from 54 tests.

About plugin

  • Plugin page: enquiry-quotation...
  • Plugin version: 2.2.33.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.0
  • WordPress version: 6.3.1
  • First release: May 31, 2019
  • Latest release: Nov 24, 2023
  • Number of updates: 210
  • Update frequency: every 7.8 days
  • Top authors: rajeshsingh520 (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

1,000+ active /68,079 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.74ms] Passed 4 tests

This is a short check of server-side resources used by Product Enquiry for WooCommerce, WooCommerce product catalog
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.12 ▼4.87
Dashboard /wp-admin3.31 ▲0.0045.06 ▼1.94
Posts /wp-admin/edit.php3.36 ▲0.0045.80 ▲3.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.77 ▲0.17
Media Library /wp-admin/upload.php3.23 ▲0.0034.18 ▼0.31

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 70 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Enquiry for WooCommerce, WooCommerce product catalog
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.27 ▲0.031.82 ▼0.0538.26 ▼6.84
Dashboard /wp-admin2,195 ▲185.62 ▼0.0190.43 ▼5.2238.80 ▼2.27
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0339.70 ▲1.9436.97 ▼0.09
Add New Post /wp-admin/post-new.php1,526 ▼023.15 ▼0.05589.26 ▼107.2862.81 ▲11.27
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.0396.09 ▼0.6741.77 ▼0.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/enquiry-quotation-for-woocommerce/public/partials/email-template.php
    • > /wp-content/plugins/enquiry-quotation-for-woocommerce/includes/pisol.class.form.php
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/enquiry-quotation-for-woocommerce/includes/includes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/enquiry-quotation-for-woocommerce/admin/class-eqw-product-options.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/enquiry-quotation-for-woocommerce/admin/partials/enquiry_detail.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function pisol_email_table_row() in wp-content/plugins/enquiry-quotation-for-woocommerce/public/partials/pisol-eqw-email.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/enquiry-quotation-for-woocommerce/includes/banner-sample.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/enquiry-quotation-for-woocommerce/public/class-eqw-product.php:14
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/enquiry-quotation-for-woocommerce/admin/partials/enquiry_detail.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/enquiry-quotation-for-woocommerce/public/partials/pisol-eqw-shortcode.php:7
    • > PHP Notice
      Undefined variable: enquiry in wp-content/plugins/enquiry-quotation-for-woocommerce/admin/partials/enquiry_detail.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/enquiry-quotation-for-woocommerce/public/class-eqw-enquiry-shortcode.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: The official readme.txt is a good inspiration

enquiry-quotation-for-woocommerce/pisol-enquiry-quotation-woocommerce.php 85% from 13 tests

This is the main PHP file of "Product Enquiry for WooCommerce, WooCommerce product catalog" version 2.2.33.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • 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
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("enquiry-quotation-for-woocommerce.php" instead of "pisol-enquiry-quotation-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin16,364 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
CSS42,096259,556
SVG8663,424
PHP377844893,028
JavaScript783112348
XML1008

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity13.28
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes00.00%
Methods185
▷ Static methods1910.27%
▷ Public methods18097.30%
▷ Protected methods00.00%
▷ Private methods52.70%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.25MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/pi-web-solution.png21.25KB9.42KB▼ 55.67%
includes/background.png74.27KB26.29KB▼ 64.60%
admin/img/pi.png1.48KB1.11KB▼ 24.83%
admin/img/close.png4.32KB3.39KB▼ 21.57%
public/img/Logo.png23.41KB10.43KB▼ 55.44%