73% woo-rfq-for-woocommerce

Code Review | NP Quote Request WooCommerce

WordPress plugin NP Quote Request WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: woo-rfq-for-wooco...
  • Plugin version: 1.9.117
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 12, 2016
  • Latest release: Nov 28, 2023
  • Number of updates: 935
  • Update frequency: every 3.1 days
  • Top authors: gplsaver (100%)

Code review

54 tests

User reviews

74 reviews

Install metrics

9,000+ active /692,490 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.15MB] [CPU: ▲11.35ms] Passed 4 tests

Analyzing server-side resources used by NP Quote Request WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.64 ▲1.1854.66 ▲14.69
Dashboard /wp-admin4.44 ▲1.1459.08 ▲13.84
Posts /wp-admin/edit.php4.56 ▲1.2058.84 ▲13.07
Add New Post /wp-admin/post-new.php7.02 ▲1.14101.99 ▲3.79
Media Library /wp-admin/upload.php4.37 ▲1.1450.41 ▲18.12

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 67 new files
Database: 1 new table, 14 new options
New tables
wp_npxyz2021_sessions
New WordPress options
widget_theysaidso_widget
gpls_woo_rfq_qr_page_check
db_upgraded
widget_recent-posts
settings_gpls_woo_rfq_sessions_notable_fix21487m
settings_gpls_woo_rfq_allow_coupon_entry
settings_gpls_woo_rfq_old_shipping_coupon
settings_gpls_woo_rfq_cookie
can_compress_scripts
settings_gpls_woo_rfq_show_shipping
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for NP Quote Request WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲12513.33 ▼1.029.24 ▲7.6338.00 ▼2.01
Dashboard /wp-admin2,195 ▲175.59 ▼0.1294.86 ▼17.1643.99 ▲2.91
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0140.15 ▲1.4939.07 ▲6.22
Add New Post /wp-admin/post-new.php1,526 ▼023.21 ▼0.01618.27 ▼25.4148.68 ▲0.08
Media Library /wp-admin/upload.php1,400 ▼34.15 ▼0.0396.83 ▲1.2042.85 ▲1.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_npxyz2021_sessions
  • The uninstall procedure has failed, leaving 14 options in the database
    • settings_gpls_woo_rfq_sessions_notable_fix21487m
    • settings_gpls_woo_rfq_cookie
    • settings_gpls_woo_rfq_show_shipping
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • rfq_cart_sc_section_show_link_to_rfq_page
    • settings_gpls_woo_rfq_show_applied_coupons
    • can_compress_scripts
    • widget_recent-comments
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-rfq-for-woocommerce/wp-session-manager/wp-cookie-session.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-rfq-for-woocommerce/wp-session-manager/includes/wp-cli.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-rfq-for-woocommerce/wp-session-manager/includes/php-session.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/woo-rfq-for-woocommerce/includes/classes/admin/settings/gpls_woo_rfq_settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-rfq-for-woocommerce/wp-session-manager/php-cookie-session.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/woo-rfq-for-woocommerce/includes/classes/checkout/gpls_woo_rfq_ncheckout.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-rfq-for-woocommerce/wp-session-manager/includes/class-php-session.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-rfq-for-woocommerce/wp-session-manager/includes/class-wp-session.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-rfq-for-woocommerce/woo-rfq-includes/woo-rfq-functions.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-rfq-for-woocommerce/wp-session-manager/includes/wp-session.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #0 (getquote.png), #2 (thankyou.png)
  • Screenshots: These screenshots lack descriptions #17, #18 in woo-rfq-for-woocommerce/assets to your readme.txt
The official readme.txt might help

woo-rfq-for-woocommerce/woo-rfq-for-woocommerce.php 85% from 13 tests

"NP Quote Request WooCommerce" version 1.9.117's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "6.0")
  • Description: Please keep the plugin description shorter than 140 characters (currently 270 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin10,110 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP454,8571,6469,342
CSS517241491
JavaScript617712277

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 103)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity35.83
▷ Minimum class complexity1.00
▷ Maximum class complexity372.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity103.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes14.35%
Methods225
▷ Static methods146.22%
▷ Public methods20289.78%
▷ Protected methods219.33%
▷ Private methods20.89%
Functions164
▷ Named functions16298.78%
▷ Anonymous functions21.22%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.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.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
gpls_assets/img/favorite24.png1.91KB1.62KB▼ 15.16%
gpls_assets/img/favorite16.png0.70KB0.82KB0.00%
gpls_assets/img/payfast.png12.54KB5.79KB▼ 53.86%