84% product-quotation-for-woocommerce

Code Review | Product Quotation - Request a Quote for WooCommerce

WordPress plugin Product Quotation - Request a Quote for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: product-quotation...
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 24, 2020
  • Latest release: Apr 17, 2023
  • Number of updates: 18
  • Update frequency: every 46.9 days
  • Top authors: mahfuz01 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active / 3,137 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.71MB] [CPU: ▼0.05ms] Passed 4 tests

Server-side resources used by Product Quotation - Request a Quote for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲0.7342.22 ▲0.36
Dashboard /wp-admin4.01 ▲0.7150.64 ▲2.29
Posts /wp-admin/edit.php4.06 ▲0.7153.03 ▲6.78
Add New Post /wp-admin/post-new.php6.59 ▲0.7193.25 ▼9.63
Media Library /wp-admin/upload.php3.93 ▲0.7045.28 ▲11.40
Settings /wp-admin/edit.php?post_type=pqfw_quotations&page=pqfw-settings3.9338.33
Help /wp-admin/edit.php?post_type=pqfw_quotations&page=pqfw-help3.8440.34
Quotations /wp-admin/edit.php?post_type=pqfw_quotations3.9841.73

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 60 new files
Database: no new tables, 7 new options
New WordPress options
pqfw_quotations_cart
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Product Quotation - Request a Quote for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,988 ▲25314.00 ▼0.389.81 ▲7.8637.24 ▼17.36
Dashboard /wp-admin2,256 ▲685.85 ▲0.92113.47 ▲5.6996.69 ▲47.04
Posts /wp-admin/edit.php2,156 ▲672.14 ▲0.1538.40 ▼2.4834.62 ▼3.92
Add New Post /wp-admin/post-new.php1,584 ▲4023.08 ▲4.98679.79 ▲41.5756.28 ▲3.95
Media Library /wp-admin/upload.php1,453 ▲684.27 ▲0.08101.77 ▲2.4574.32 ▲31.21
Settings /wp-admin/edit.php?post_type=pqfw_quotations&page=pqfw-settings1,0296.85174.5957.98
Help /wp-admin/edit.php?post_type=pqfw_quotations&page=pqfw-help9172.1531.2136.40
Quotations /wp-admin/edit.php?post_type=pqfw_quotations1,1592.0930.8029.84

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • pqfw_quotations_cart
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/product-quotation-for-woocommerce/includes/Views/help.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/product-quotation-for-woocommerce/includes/Views/quotation-detail.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/product-quotation-for-woocommerce/includes/Views/quotation-products-detail.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/product-quotation-for-woocommerce/includes/Views/pqfw-cart-shortcode.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Attributes that require attention: The official readme.txt might help

product-quotation-for-woocommerce/product-quotation-for-woocommerce.php 92% from 13 tests

"Product Quotation - Request a Quote for WooCommerce" version 2.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected5,029 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP307751,6503,253
PO File33544081,001
JavaScript34029304
CSS46018265
Markdown1650179
JSON10021
SVG6006

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity15.78
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes14.55%
Methods196
▷ Static methods21.02%
▷ Public methods13970.92%
▷ Protected methods94.59%
▷ Private methods4824.49%
Functions7
▷ Named functions228.57%
▷ Anonymous functions571.43%
Constants9
▷ Global constants888.89%
▷ Class constants111.11%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
build/images/form.3bf7f595.png3.33KB1.97KB▼ 40.72%
assets/images/pqfw-dashboard-icon.png1.24KB0.64KB▼ 47.91%
build/images/reset.3bcbcd44.png7.77KB8.56KB0.00%
build/images/button.3f1daf8f.png16.96KB6.93KB▼ 59.13%
build/images/email.5183ffb9.png7.45KB3.84KB▼ 48.45%