74% wp-inquiries

Code Review | WP Inquiries

WordPress plugin WP Inquiries scored 74% from 54 tests.

About plugin

  • Plugin page: wp-inquiries
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.6
  • WordPress version: 6.3.1
  • First release: Apr 3, 2019
  • Latest release: Dec 24, 2020
  • Number of updates: 15
  • Update frequency: every 42.2 days
  • Top authors: aristorinjuang (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,071 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.58MB] [CPU: ▼16.68ms] Passed 4 tests

Server-side resources used by WP Inquiries
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1045.14 ▼1.54
Dashboard /wp-admin3.40 ▲0.1051.63 ▼3.68
Posts /wp-admin/edit.php3.52 ▲0.1653.70 ▲0.21
Add New Post /wp-admin/post-new.php3.27 ▼2.6141.83 ▼60.94
Media Library /wp-admin/upload.php3.32 ▲0.1038.64 ▼0.55

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: 1 new table, 7 new options
New tables
wp_inquiries
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
inquiries_db_version
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

WP Inquiries: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲9813.57 ▲0.258.25 ▲2.9440.79 ▼1.30
Dashboard /wp-admin2,215 ▲125.90 ▲0.10113.89 ▼0.8743.02 ▼1.17
Posts /wp-admin/edit.php2,101 ▲122.04 ▼0.0040.18 ▲2.7634.82 ▲0.23
Add New Post /wp-admin/post-new.php1,543 ▲13323.38 ▲5.67670.04 ▲24.2553.01 ▲3.22
Media Library /wp-admin/upload.php1,397 ▲94.20 ▲0.0095.83 ▼1.4741.51 ▼1.03

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_inquiries
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • inquiries_db_version
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 9× 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/wp-inquiries/includes/ajax.php:85
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-inquiries/includes/database.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-inquiries/includes/settings.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-inquiries/wp-inquiries.php:28
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-inquiries/classes/inquiries-list-table.php on line 3
    • > 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/wp-inquiries/classes/inquiries-list-table.php on line 3
    • > 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/wp-inquiries/classes/inquiries-list-table.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/wp-inquiries/classes/inquiries-rest-api.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-inquiries/includes/shortcodes.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes: The official readme.txt is a good inspiration

wp-inquiries/wp-inquiries.php 92% from 13 tests

The main file in "WP Inquiries" v. 0.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected557 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP711524493
JavaScript14035
CSS16029

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity17.00
▷ Minimum class complexity11.00
▷ Maximum class complexity23.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods422.22%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin