10% wpheka-request-for-quote

Code Review | Request For Quote

WordPress plugin Request For Quote scored10%from 54 tests.

About plugin

  • Plugin page: wpheka-request-fo...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0
  • WordPress version: 6.3.1
  • First release: May 8, 2020
  • Latest release: Jun 9, 2022
  • Number of updates: 18
  • Update frequency: every 42.3 days
  • Top authors: akshayaswaroop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,827 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/wpheka-request-for-quote/includes/class-wpheka-rfq-install.php+33
    Uncaught Error: Call to undefined function wc_maybe_define_constant() in wp-content/plugins/wpheka-request-for-quote/includes/class-wpheka-rfq-install.php:33
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): WPHEKA_Rfq_Install::install()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▼0.01MB] [CPU: ▼4.38ms] Passed 4 tests

Server-side resources used by Request For Quote
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.14 ▼4.12
Dashboard /wp-admin3.31 ▼0.0454.05 ▼7.94
Posts /wp-admin/edit.php3.36 ▲0.0054.26 ▲3.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.12 ▼5.54
Media Library /wp-admin/upload.php3.23 ▲0.0038.59 ▲0.09

Server storage [IO: ▲0.73MB] [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: 44 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Request For Quote
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▲0.031.77 ▼0.0141.06 ▼6.33
Dashboard /wp-admin2,195 ▲215.58 ▲0.0290.65 ▼1.4036.97 ▼6.97
Posts /wp-admin/edit.php2,103 ▼02.01 ▲0.0339.22 ▼2.9536.49 ▼2.47
Add New Post /wp-admin/post-new.php1,526 ▼022.98 ▲0.08672.13 ▲48.1055.91 ▼4.94
Media Library /wp-admin/upload.php1,403 ▲124.24 ▲0.0297.32 ▼5.7544.71 ▼3.58

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 8× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wpheka-request-for-quote/templates/request-for-quote-form.php
    • > /wp-content/plugins/wpheka-request-for-quote/templates/admin/settings/settings-form.php
    • > /wp-content/plugins/wpheka-request-for-quote/templates/admin/settings/sidebar-support.php
    • > /wp-content/plugins/wpheka-request-for-quote/templates/emails/request-for-quote-mail-template.php
    • > /wp-content/plugins/wpheka-request-for-quote/templates/single-product/add-to-quote.php
    • > /wp-content/plugins/wpheka-request-for-quote/templates/request-for-quote.php
    • > /wp-content/plugins/wpheka-request-for-quote/templates/admin/settings/settings-form-submit.php
    • > /wp-content/plugins/wpheka-request-for-quote/templates/request-for-quote-empty.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Please fix this invalid URI: "paypal.me/AKSHAYASWAROOP"
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
Please take inspiration from this readme.txt

wpheka-request-for-quote/wpheka-request-for-quote.php 85% from 13 tests

The main file in "Request For Quote" v. 1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 156 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("4.8" instead of "4.4")

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
There were no executable files found in this plugin10,155 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
CSS81,0092927,817
PHP173917121,574
JavaScript59250384
SVG705202
PO File16980178

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity19.62
▷ Minimum class complexity3.00
▷ Maximum class complexity40.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods77
▷ Static methods1114.29%
▷ Public methods6787.01%
▷ Protected methods11.30%
▷ Private methods911.69%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/wp-heka-menu-icon-22.png0.51KB0.34KB▼ 32.76%
assets/admin/images/control-panel-icon.png2.55KB1.75KB▼ 31.63%