74% woo-inquiry

Code Review | Woo Inquiry

WordPress plugin Woo Inquiry scored 74% from 54 tests.

About plugin

  • Plugin page: woo-inquiry
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: May 16, 2019
  • Latest release: May 17, 2019
  • Number of updates: 13
  • Update frequency: every 0.1 days
  • Top authors: sjhoo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,033 total downloads

Benchmarks

Plugin footprint 65% 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.43MB] [CPU: ▲2.07ms] Passed 4 tests

An overview of server-side resources used by Woo Inquiry
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4346.66 ▲2.13
Dashboard /wp-admin3.73 ▲0.4349.72 ▲0.65
Posts /wp-admin/edit.php3.84 ▲0.4946.20 ▲1.06
Add New Post /wp-admin/post-new.php6.31 ▲0.4296.99 ▲4.43
Media Library /wp-admin/upload.php3.65 ▲0.4240.32 ▲5.70

Server storage [IO: ▲3.55MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 72 new files
Database: 5 new tables, 10 new options
New tables
woo_wpinq_worktime_items
woo_wpinq_users
woo_wpinq_sms_history
woo_wpinq_bot_admin
woo_wpinq_requests
New WordPress options
woo_wpinq_options
theysaidso_admin_options
widget_recent-posts
woo_wpinq_access_code
woo_wpinq_current_date
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
woo_wpinq_vendors_access_code

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Inquiry
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲22714.19 ▼0.1812.42 ▲10.6643.06 ▲1.66
Dashboard /wp-admin2,217 ▲425.80 ▲0.8699.73 ▼15.3739.70 ▼6.47
Posts /wp-admin/edit.php2,102 ▲162.01 ▲0.0035.82 ▲2.0733.67 ▼3.47
Add New Post /wp-admin/post-new.php1,523 ▲417.80 ▼5.58598.73 ▼138.3758.12 ▲3.76
Media Library /wp-admin/upload.php1,402 ▲144.22 ▲0.0695.48 ▼5.8541.32 ▼3.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure failed, leaving 5 tables in the database
    • woo_wpinq_bot_admin
    • woo_wpinq_sms_history
    • woo_wpinq_users
    • woo_wpinq_requests
    • woo_wpinq_worktime_items
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • woo_wpinq_options
    • db_upgraded
    • widget_theysaidso_widget
    • woo_wpinq_current_date
    • woo_wpinq_access_code
    • theysaidso_admin_options
    • woo_wpinq_vendors_access_code
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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
  • 33× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function woo_wpinq_english_Numbers() in wp-content/plugins/woo-inquiry/bot/rest.php:20
    • > PHP Notice
      Trying to get property 'message' of non-object in wp-content/plugins/woo-inquiry/bot/rest.php on line 15
    • > PHP Notice
      Trying to get property 'id' of non-object in wp-content/plugins/woo-inquiry/bot/rest.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/woo-inquiry/woo_inquiry.php:16
    • > PHP Notice
      Trying to get property 'message' of non-object in wp-content/plugins/woo-inquiry/bot/rest.php on line 9
    • > PHP Notice
      Trying to get property 'first_name' of non-object in wp-content/plugins/woo-inquiry/bot/rest.php on line 8
    • > PHP Notice
      Trying to get property 'reply_to_message' of non-object in wp-content/plugins/woo-inquiry/bot/rest.php on line 13
    • > PHP Notice
      Trying to get property 'message' of non-object in wp-content/plugins/woo-inquiry/bot/rest.php on line 8
    • > PHP Notice
      Trying to get property 'callback_query' of non-object in wp-content/plugins/woo-inquiry/bot/rest.php on line 14
    • > PHP Notice
      Trying to get property 'from' of non-object in wp-content/plugins/woo-inquiry/bot/rest.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Requires php: Version not formatted correctly
Please take inspiration from this readme.txt

woo-inquiry/woo_inquiry.php 92% from 13 tests

This is the main PHP file of "Woo Inquiry" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-inquiry.php" instead of "woo_inquiry.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected39,951 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript224,0558,36618,833
CSS131,85120618,119
PHP7967622,346
PO File1149158361
SVG200289
JSON3003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions59
▷ Named functions5898.31%
▷ Anonymous functions11.69%
Constants2
▷ Global constants2100.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
6 compressed PNG files occupy 0.15MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/jquery-datatable/skin/bootstrap/images/sort_both.png0.20KB0.29KB0.00%
assets/jquery-datatable/skin/bootstrap/images/sort_desc.png0.15KB0.25KB0.00%
assets/jquery-datatable/skin/bootstrap/images/sort_asc.png0.16KB0.25KB0.00%
assets/demo.png149.91KB49.34KB▼ 67.09%
assets/jquery-datatable/skin/bootstrap/images/sort_asc_disabled.png0.14KB0.25KB0.00%