84% woo-product-enquiry

Code Review | WooCommerce Product Enquiry

WordPress plugin WooCommerce Product Enquiry scored84%from 54 tests.

About plugin

  • Plugin page: woo-product-enquiry
  • Plugin version: 2.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8.0
  • WordPress version: 6.3.1
  • First release: Jun 6, 2017
  • Latest release: Aug 2, 2021
  • Number of updates: 28
  • Update frequency: every 54.3 days
  • Top authors: mingocommerce (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /36,426 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼11.05ms] Passed 4 tests

Server-side resources used by WooCommerce Product Enquiry
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1047.00 ▼1.95
Dashboard /wp-admin3.40 ▲0.0652.52 ▼17.57
Posts /wp-admin/edit.php3.51 ▲0.1651.09 ▼4.63
Add New Post /wp-admin/post-new.php5.98 ▲0.0985.29 ▼20.03
Media Library /wp-admin/upload.php3.32 ▲0.0941.16 ▲7.55
Product Enquiry /wp-admin/edit.php?post_type=product_enquiry3.3739.37
Product Enquiry Form /wp-admin/admin.php?page=producy_enquiry_form_settings_page3.2931.59

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

WooCommerce Product Enquiry: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7513.21 ▼1.142.31 ▲0.4644.40 ▲1.31
Dashboard /wp-admin2,227 ▲245.88 ▲0.02101.68 ▲0.2142.56 ▼2.92
Posts /wp-admin/edit.php2,100 ▼02.05 ▲0.0536.67 ▼4.5434.99 ▼2.32
Add New Post /wp-admin/post-new.php1,549 ▲2322.77 ▲5.19664.79 ▼49.3654.45 ▼5.29
Media Library /wp-admin/upload.php1,397 ▼34.30 ▲0.0898.72 ▼12.4744.90 ▼0.87
Product Enquiry /wp-admin/edit.php?post_type=product_enquiry1,0981.9932.5927.26
Product Enquiry Form /wp-admin/admin.php?page=producy_enquiry_form_settings_page8542.1823.4831.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% 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 50% 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-product-enquiry/woocommerce-product-enquiry-basic.php:284

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: You can take inspiration from this readme.txt

woo-product-enquiry/woocommerce-product-enquiry-basic.php 92% from 13 tests

This is the main PHP file of "WooCommerce Product Enquiry" version 2.3.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-product-enquiry.php" instead of "woocommerce-product-enquiry-basic.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 plugin355 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17110355

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity23.50
▷ Minimum class complexity10.00
▷ Maximum class complexity37.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods15.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin