77% elex-request-a-quote

Code Review | ELEX WooCommerce Request a Quote

WordPress plugin ELEX WooCommerce Request a Quote scored77%from 54 tests.

About plugin

  • Plugin page: elex-request-a-quote
  • Plugin version: 2.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 17, 2020
  • Latest release: Nov 29, 2023
  • Number of updates: 40
  • Update frequency: every 28.5 days
  • Top authors: elextensions (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

800+ active /15,876 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 successfully, without throwing any errors or notices

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

Analyzing server-side resources used by ELEX WooCommerce Request a Quote
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.24 ▼1.09
Dashboard /wp-admin3.32 ▼0.0345.98 ▼18.70
Posts /wp-admin/edit.php3.37 ▲0.0149.51 ▲1.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.86 ▼11.11
Media Library /wp-admin/upload.php3.25 ▲0.0136.79 ▲3.06

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 206 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for ELEX WooCommerce Request a Quote
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲4914.20 ▼0.051.56 ▼0.1039.37 ▼3.45
Dashboard /wp-admin2,195 ▲215.50 ▼0.0891.59 ▼13.6640.68 ▼5.28
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0739.52 ▲0.8137.50 ▲1.32
Add New Post /wp-admin/post-new.php1,532 ▲623.42 ▼0.26611.09 ▼71.3360.99 ▲1.61
Media Library /wp-admin/upload.php1,409 ▲64.19 ▲0.0497.92 ▲1.0042.27 ▲0.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/elex-request-a-quote/view/quote/mini_quote_list.php
    • > /wp-content/plugins/elex-request-a-quote/review_and_troubleshoot_notify/resources/logo.php
    • > /wp-content/plugins/elex-request-a-quote/view/notification_header.php
    • > /wp-content/plugins/elex-request-a-quote/view/quote/quote_list_main.php
  • 47× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WpFluent\\QueryBuilder\\QueryBuilderHandler' not found in wp-content/plugins/elex-request-a-quote/src/wp-fluent/src/QueryBuilder/JoinBuilder.php:3
    • > PHP Notice
      Undefined variable: sub_tabs in wp-content/plugins/elex-request-a-quote/view/notification_header.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/elex-request-a-quote/view/saved_toast.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/elex-request-a-quote/src/TemplateSetting/DefaultTemplates/non_logo_template.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/elex-request-a-quote/view/help_support/faqs.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Elex\\RequestAQuote\\FormSetting\\Models\\Fluent' not found in wp-content/plugins/elex-request-a-quote/src/FormSetting/Models/FormField.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/elex-request-a-quote/view/notification_settings/general.php:9
    • > PHP Notice
      Undefined variable: sub_tabs in wp-content/plugins/elex-request-a-quote/view/notification_header.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/elex-request-a-quote/view/help_support/tickets.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-request-a-quote/review_and_troubleshoot_notify/resources/review.php:58

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 83% 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
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #10, #11, #12, #9 in elex-request-a-quote/assets to your readme.txt
  • Donate link: Invalid url: ""
Please take inspiration from this readme.txt

elex-request-a-quote/class-elex-request-a-quote.php 77% from 13 tests

Analyzing the main PHP file in "ELEX WooCommerce Request a Quote" version 2.1.3
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 255 characters long)
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.0.1" instead of "2.6.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("elex-request-a-quote.php" instead of "class-elex-request-a-quote.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected46,227 lines of code in 169 files:
LanguageFilesBlank linesComment linesLines of code
JSON60017,460
PO File96,0415,17512,034
PHP922,8632,70211,083
JavaScript40700834,371
Sass45315523
Markdown11410484
SVG1100165
XML214156
CSS341139
YAML13212

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity25.57
▷ Minimum class complexity1.00
▷ Maximum class complexity278.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces20
Interfaces0
Traits0
Classes47
▷ Abstract classes12.13%
▷ Concrete classes4697.87%
▷ Final classes00.00%
Methods556
▷ Static methods25946.58%
▷ Public methods53496.04%
▷ Protected methods152.70%
▷ Private methods71.26%
Functions19
▷ Named functions947.37%
▷ Anonymous functions1052.63%
Constants27
▷ Global constants622.22%
▷ Class constants2177.78%
▷ Public constants21100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
11 PNG files occupy 0.94MB with 0.67MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/image temp.png67.06KB24.08KB▼ 64.09%
assets/images/image temp@2x.png184.79KB59.32KB▼ 67.90%
assets/images/youtube.png78.70KB19.21KB▼ 75.58%
assets/images/request_a_quote.png94.60KB24.70KB▼ 73.89%
assets/images/google_feed.png80.41KB19.81KB▼ 75.37%