78% woo-add-to-quote

Code Review | Quote for WooCommerce Lite

WordPress plugin Quote for WooCommerce Lite scored78%from 54 tests.

About plugin

  • Plugin page: woo-add-to-quote
  • Plugin version: 1.4.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Mar 9, 2016
  • Latest release: May 24, 2022
  • Number of updates: 81
  • Update frequency: every 30.3 days
  • Top authors: wooexpert (55.56%)wpexpertsio (45.68%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /12,981 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Quote for WooCommerce Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.53 ▲4.49
Dashboard /wp-admin3.31 ▲0.0047.71 ▼10.77
Posts /wp-admin/edit.php3.36 ▲0.0047.16 ▲0.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.64 ▼12.74
Media Library /wp-admin/upload.php3.23 ▲0.0039.66 ▲3.72
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius3.0026.28

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 178 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
fs_gdpr
fs_accounts
db_upgraded
widget_theysaidso_widget
fs_debug_mode
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
fs_active_plugins

Browser metrics Passed 4 tests

This is an overview of browser requirements for Quote for WooCommerce Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.14 ▼1.231.92 ▲0.0645.31 ▲0.65
Dashboard /wp-admin2,206 ▲245.83 ▲0.94113.86 ▼16.5241.21 ▼5.90
Posts /wp-admin/edit.php2,092 ▼02.03 ▲0.0242.09 ▼2.5633.33 ▼4.79
Add New Post /wp-admin/post-new.php1,533 ▲1423.02 ▼0.24720.94 ▲24.1355.84 ▼1.48
Media Library /wp-admin/upload.php1,388 ▼04.28 ▲0.05110.24 ▼1.6948.90 ▲2.46
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius280.440.093.67

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
  • This plugin does not fully uninstall, leaving 10 options in the database
    • db_upgraded
    • fs_debug_mode
    • widget_recent-posts
    • can_compress_scripts
    • fs_accounts
    • widget_theysaidso_widget
    • widget_recent-comments
    • fs_gdpr
    • fs_active_plugins
    • theysaidso_admin_options

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 everything seems fine, this is not 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 fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/woo-add-to-quote/woo_add_to_quote.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-add-to-quote/admin/class_watq_meta_boxes.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-add-to-quote/admin/admin_functions.php:74
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/woo-add-to-quote/admin/class_setting_page.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Network (severe)
    wp-admin/admin.php?page=freemius - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: inquiry, request quote, quote plugin, email quote, quotation

woo-add-to-quote/woo_add_to_quote.php 92% from 13 tests

"Quote for WooCommerce Lite" version 1.4.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-add-to-quote.php" instead of "woo_add_to_quote.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin33,248 lines of code in 135 files:
LanguageFilesBlank linesComment linesLines of code
PHP1157,30716,19532,157
CSS13161425
JavaScript44761303
Markdown1680214
SQL1963,969122
JSON10027

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity86.81
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.63
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes47
▷ Abstract classes24.26%
▷ Concrete classes4595.74%
▷ Final classes00.00%
Methods1,144
▷ Static methods17315.12%
▷ Public methods80470.28%
▷ Protected methods151.31%
▷ Private methods32528.41%
Functions140
▷ Named functions140100.00%
▷ Anonymous functions00.00%
Constants125
▷ Global constants10080.00%
▷ Class constants2520.00%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/wc-quote.png9.16KB5.26KB▼ 42.58%