74% custom-inquiry-form

Code Review | Custom Inquiry Form

WordPress plugin Custom Inquiry Form scored74%from 54 tests.

About plugin

  • Plugin page: custom-inquiry-form
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.3-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2018
  • Latest release: Oct 4, 2023
  • Number of updates: 11
  • Update frequency: every 189.5 days
  • Top authors: dharmesh351991 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /907 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼11.93ms] Passed 4 tests

An overview of server-side resources used by Custom Inquiry Form
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1438.53 ▲0.32
Dashboard /wp-admin3.45 ▲0.1048.35 ▼14.25
Posts /wp-admin/edit.php3.56 ▲0.2145.58 ▼8.45
Add New Post /wp-admin/post-new.php6.05 ▲0.1681.32 ▼25.33
Media Library /wp-admin/upload.php3.37 ▲0.1440.33 ▲5.05
Inquiry Listing /wp-admin/admin.php?page=wp-custom-inquiry-listing3.3433.04
Inquiry Settings /wp-admin/admin.php?page=wp_inquiry_settings3.3431.55

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 26 new files
Database: 1 new table, 7 new options
New tables
wp_custom_inquiry_az
New WordPress options
widget_az_custom_inquiry
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Inquiry Form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲18113.74 ▼0.667.51 ▲5.9638.69 ▼4.44
Dashboard /wp-admin2,222 ▲415.65 ▼0.0687.48 ▼7.7638.10 ▼2.80
Posts /wp-admin/edit.php2,127 ▲301.98 ▼0.0432.59 ▼6.0834.99 ▼0.54
Add New Post /wp-admin/post-new.php1,550 ▲2422.84 ▼0.56670.60 ▲8.2748.89 ▼5.13
Media Library /wp-admin/upload.php1,427 ▲274.21 ▲0.12107.43 ▲0.6147.48 ▲0.34
Inquiry Listing /wp-admin/admin.php?page=wp-custom-inquiry-listing9982.0324.2827.96
Inquiry Settings /wp-admin/admin.php?page=wp_inquiry_settings8632.0022.2629.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_custom_inquiry_az
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_az_custom_inquiry
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/custom-inquiry-form/includes/class-custom-inquiry-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/custom-inquiry-form/admin/partials/custom-inquiry-form-admin-display.php:193
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-inquiry-form/includes/class-ajax-callback.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-inquiry-form/includes/class-custom-inquiry-widget.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-inquiry-form/includes/class-custom-inquiry-list-table.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/custom-inquiry-form/includes/class-custom-inquiry-list-table.php on line 4

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: inquiry, form, contact

custom-inquiry-form/custom-inquiry-form.php Passed 13 tests

This is the main PHP file of "Custom Inquiry Form" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
77 characters long description:
Wordpress custom Inquiry for users inquiry with option page listed inquiries.

Code Analysis Passed 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 plugin754 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15178610583
CSS2920136
JavaScript245435

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.09
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods51
▷ Static methods23.92%
▷ Public methods4588.24%
▷ Protected methods00.00%
▷ Private methods611.76%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin