83% product-quote-cart-for-wc

Code Review | Add to Quote For Woocommerce

WordPress plugin Add to Quote For Woocommerce scored 83% from 54 tests.

About plugin

  • Plugin page: product-quote-car...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 11, 2023
  • Latest release: Aug 4, 2023
  • Number of updates: 5
  • Update frequency: every 11.2 days
  • Top authors: gravitymaster97 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 89 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.73ms] Passed 4 tests

This is a short check of server-side resources used by Add to Quote For Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0944.90 ▲4.17
Dashboard /wp-admin3.39 ▲0.0845.13 ▼4.73
Posts /wp-admin/edit.php3.44 ▲0.0848.02 ▲0.73
Add New Post /wp-admin/post-new.php5.97 ▲0.0883.51 ▼6.48
Media Library /wp-admin/upload.php3.31 ▲0.0836.56 ▲3.56

Server storage [IO: ▲0.28MB] [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: 23 new files
Database: no new tables, 25 new options
New WordPress options
widget_recent-comments
gmpqcw_field_customizer_enble
gmpqcw_customer_email_subject
widget_recent-posts
gmpqcw_field_customizer_order
gmpqcw_button_label
gmpqcw_field_customizer_field
gmpqcw_email_sucesemsg
gmpqcw_field_customizer_required
gmpqcw_sp_bl
...

Browser metrics Passed 4 tests

Add to Quote For Woocommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲21113.22 ▼1.185.26 ▲3.4240.02 ▼7.59
Dashboard /wp-admin2,222 ▲375.86 ▲0.05102.93 ▲1.4740.53 ▼1.00
Posts /wp-admin/edit.php2,105 ▲162.03 ▲0.0340.36 ▲6.9837.05 ▲1.29
Add New Post /wp-admin/post-new.php1,547 ▲923.46 ▲0.34663.73 ▲3.6345.23 ▼6.29
Media Library /wp-admin/upload.php1,404 ▲164.37 ▲0.1496.58 ▲3.0142.35 ▲3.04

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 25 options
    • gmpqcw_button_label
    • gmpqcw_sp_bl
    • gmpqcw_email_body
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • gmpqcw_email_sub
    • gmpqcw_field_customizer_enble
    • theysaidso_admin_options
    • gmpqcw_usershow
    • ...

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'GMPQCW_Shortcode' not found in wp-content/plugins/product-quote-cart-for-wc/includes/GMPQCW_Frontend.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-quote-cart-for-wc/includes/GMPQCW_Enquiry_Button_Cart.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/product-quote-cart-for-wc/includes/GMPQCW_list.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-quote-cart-for-wc/includes/GMPQCW_Email_customizer.php:2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/product-quote-cart-for-wc/includes/GMPQCW_list.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/product-quote-cart-for-wc/includes/GMPQCW_list.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/product-quote-cart-for-wc/includes/GMPQCW_Translate.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-quote-cart-for-wc/includes/GMPQCW_Exclude.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-quote-cart-for-wc/includes/GMPQCW_Form_customizer.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-quote-cart-for-wc/includes/GMPQCW_General.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: Plugin contributors field is missing
  • Screenshots: Add descriptions for screenshots #1, #3, #5, #6, #7 in product-quote-cart-for-wc/assets to your readme.txt
You can take inspiration from this readme.txt

product-quote-cart-for-wc/product-quote-cart-for-woocommerce.php 85% from 13 tests

Analyzing the main PHP file in "Add to Quote For Woocommerce" version 1.0
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("product-quote-cart-for-wc.php" instead of "product-quote-cart-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin5,002 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript45643892,660
PHP132541541,621
CSS311739721

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity22.33
▷ Minimum class complexity5.00
▷ Maximum class complexity32.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods42
▷ Static methods00.00%
▷ Public methods42100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.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
2 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/select2/select2.png0.51KB0.99KB0.00%
assents/img/close_btn.png36.22KB17.59KB▼ 51.42%