87% wdu-inquiry-form

Code Review | WDU Inquiry Form

WordPress plugin WDU Inquiry Form scored 87% from 54 tests.

About plugin

  • Plugin page: wdu-inquiry-form
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 5.8.1
  • First release: Oct 21, 2019
  • Latest release: Oct 21, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: tathemes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 441 total downloads

Benchmarks

Plugin footprint Passed 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: ▲0.06MB] [CPU: ▼141.43ms] Passed 4 tests

An overview of server-side resources used by WDU Inquiry Form
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0738.85 ▲3.03
Dashboard /wp-admin3.13 ▲0.0750.33 ▲3.15
Posts /wp-admin/edit.php3.21 ▲0.1140.78 ▼4.81
Add New Post /wp-admin/post-new.php5.48 ▲0.0583.56 ▼565.60
Media Library /wp-admin/upload.php3.07 ▲0.0734.56 ▲1.65
WDU Inquiry Form /wp-admin/options-general.php?page=wdu_inquiry_form3.0429.94

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WDU Inquiry Form: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,822 ▲22616.37 ▲0.4315.39 ▲4.7451.87 ▲4.15
Dashboard /wp-admin2,976 ▲396.07 ▲0.07138.18 ▼32.34106.36 ▼18.70
Posts /wp-admin/edit.php2,748 ▲92.70 ▲0.0069.61 ▲1.7391.73 ▼7.19
Add New Post /wp-admin/post-new.php1,678 ▼518.73 ▲0.06355.83 ▼22.81100.65 ▼17.09
Media Library /wp-admin/upload.php1,819 ▲124.99 ▼0.01154.05 ▼4.28123.73 ▼2.61
WDU Inquiry Form /wp-admin/options-general.php?page=wdu_inquiry_form1,0652.0962.2886.36

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wdu-inquiry-form/inquiryform.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wdu-inquiry-form/wdu-scripts.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wdu-inquiry-form/wdu-button-modal-config.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wdu-inquiry-form/wdu-check-woocommerce.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wdu-inquiry-form/wdu-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wdu-inquiry-form/wdu-form.php:134

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The shop page 'add to cart' button will be replace by 'Details' button), #2 (Single page 'add to cart' button will be replace by a 'Send Request' button), #3 (After click the button a popup will come)
The official readme.txt might help

wdu-inquiry-form/inquiryform.php 77% from 13 tests

The main PHP script in "WDU Inquiry Form" version 1.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wdu-inquiry-form.php" instead of "inquiryform.php")
  • Domain Path: The domain path folder does not exist ("/languages/")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin421 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP68056303
CSS2210105
JavaScript26913

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity9.00
▷ Minimum class complexity4.00
▷ Maximum class complexity14.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1066.67%
▷ Protected methods00.00%
▷ Private methods533.33%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin