10% dilmot-live-qa-chats

Code Review | Dilmot live Q&A chats

WordPress plugin Dilmot live Q&A chats scored10%from 54 tests.

About plugin

  • Plugin page: dilmot-live-qa-chats
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1
  • WordPress version: 6.3.1
  • First release: Feb 27, 2015
  • Latest release: Apr 28, 2017
  • Number of updates: 24
  • Update frequency: every 33.0 days
  • Top authors: dilmot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,564 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/dilmot-live-qa-chats/Dilmot_Plugin.php+23
    Undefined index: values

Server metrics [RAM: ▲0.21MB] [CPU: ▲2.24ms] Passed 4 tests

Analyzing server-side resources used by Dilmot live Q&A chats
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2043.65 ▲5.19
Dashboard /wp-admin3.56 ▲0.2553.13 ▲4.12
Posts /wp-admin/edit.php3.61 ▲0.2552.58 ▼1.79
Add New Post /wp-admin/post-new.php6.08 ▲0.1997.99 ▲5.70
Media Library /wp-admin/upload.php3.42 ▲0.1939.54 ▲1.43
Dilmot /wp-admin/options-general.php?page=Dilmot_PluginSettings3.4035.58

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 62 new files
Database: no new tables, 13 new options
New WordPress options
widget_theysaidso_widget
Dilmot_Plugin_ApiKey
Dilmot_Plugin__installed
Dilmot_Plugin_StreamsCategory
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
Dilmot_Plugin_SetWpUserInQuestionForm
Dilmot_Plugin__version
...

Browser metrics Passed 4 tests

Dilmot live Q&A chats: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.37 ▲0.021.70 ▼0.4341.14 ▼2.73
Dashboard /wp-admin2,199 ▲225.61 ▼0.0796.06 ▼7.7444.69 ▲3.28
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0039.26 ▼0.2839.45 ▼0.24
Add New Post /wp-admin/post-new.php1,531 ▲522.98 ▼0.12681.12 ▼88.1666.65 ▲0.27
Media Library /wp-admin/upload.php1,407 ▲44.19 ▲0.0695.98 ▼6.4646.75 ▲1.14
Dilmot /wp-admin/options-general.php?page=Dilmot_PluginSettings9642.1223.0246.22

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/dilmot-live-qa-chats/Dilmot_Plugin.php+23
    Undefined index: values
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • Dilmot_Plugin__version
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=Dilmot_PluginSettings
    • > Notice in wp-content/plugins/dilmot-live-qa-chats/Dilmot_Plugin.php+23
    Undefined index: values
    • > GET request to /wp-admin/options-general.php?page=Dilmot_PluginSettings
    • > Notice in wp-content/plugins/dilmot-live-qa-chats/Dilmot_OptionsManager.php+286
    Undefined index: action
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Dilmot_PluginSettings
    • > Notice in wp-content/plugins/dilmot-live-qa-chats/templates/settings.php+77
    Undefined variable: dilmotPluginFormValues
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Dilmot_PluginSettings
    • > Notice in wp-content/plugins/dilmot-live-qa-chats/templates/settings.php+77
    Trying to access array offset on value of type null
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Dilmot_PluginSettings
    • > Notice in wp-content/plugins/dilmot-live-qa-chats/templates/settings.php+77
    Undefined variable: dilmotPluginValidationErrors
    • > GET request to /wp-admin/options-general.php?page=Dilmot_PluginSettings
    • > Notice in wp-content/plugins/dilmot-live-qa-chats/templates/settings.php+78
    Undefined index: hint
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Dilmot_PluginSettings
    • > Notice in wp-content/plugins/dilmot-live-qa-chats/Dilmot_OptionsManager.php+334
    Undefined index: prefixAddon
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Dilmot_PluginSettings
    • > Notice in wp-content/plugins/dilmot-live-qa-chats/Dilmot_OptionsManager.php+335
    Undefined index: postfixAddon

SRP 0% 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 take a closer look at the following
  • 9× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/dilmot-live-qa-chats/templates/admin_success.php
    • > /wp-content/plugins/dilmot-live-qa-chats/templates/stream_header/vertical_image_no_description.php
    • > /wp-content/plugins/dilmot-live-qa-chats/templates/stream_header/horizontal_image.php
    • > /wp-content/plugins/dilmot-live-qa-chats/templates/closed_stream.php
    • > /wp-content/plugins/dilmot-live-qa-chats/templates/stream_header/minimal.php
    • > /wp-content/plugins/dilmot-live-qa-chats/templates/common.php
    • > /wp-content/plugins/dilmot-live-qa-chats/templates/stream_header/horizontal_image_form_on_bottom.php
    • > /wp-content/plugins/dilmot-live-qa-chats/templates/stream_header/vertical_image.php
    • > /wp-content/plugins/dilmot-live-qa-chats/templates/stream_header/horizontal_image_no_description.php
  • 75× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: templateData in wp-content/plugins/dilmot-live-qa-chats/templates/stream_header/vertical_image.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/dilmot-live-qa-chats/templates/stream_header/horizontal_image_no_description.php on line 2
    • > PHP Notice
      Undefined variable: templateData in wp-content/plugins/dilmot-live-qa-chats/templates/stream_header/minimal.php on line 2
    • > PHP Notice
      Undefined variable: templateData in wp-content/plugins/dilmot-live-qa-chats/templates/stream_header/horizontal_image.php on line 2
    • > PHP Notice
      Undefined variable: templateData in wp-content/plugins/dilmot-live-qa-chats/templates/common.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/dilmot-live-qa-chats/templates/stream_header/minimal.php on line 2
    • > PHP Notice
      Undefined variable: templateData in wp-content/plugins/dilmot-live-qa-chats/templates/common.php on line 11
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/dilmot-live-qa-chats/templates/common.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/dilmot-live-qa-chats/templates/stream_header/horizontal_image_form_on_bottom.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/dilmot-live-qa-chats/templates/common.php on line 12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Donate link: Invalid URI found ("")
Please take inspiration from this readme.txt

dilmot-live-qa-chats/dilmot.php 85% from 13 tests

The main PHP script in "Dilmot live Q&A chats" version 1.4 is automatically included on every request by WordPress
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dilmot-live-qa-chats.php" instead of "dilmot.php")

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
No dangerous file extensions were detected12,285 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
CSS973938,926
JavaScript66032111,722
PHP242936011,153
SVG100288
PO File27586193
INI1033

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity15.62
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes225.00%
▷ Concrete classes675.00%
▷ Final classes00.00%
Methods94
▷ Static methods00.00%
▷ Public methods5760.64%
▷ Protected methods2829.79%
▷ Private methods99.57%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.73MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/dilmot-error.png3.38KB0.86KB▼ 74.43%
assets/screenshot-1.png53.93KB18.97KB▼ 64.82%
assets/screenshot-5.png89.32KB29.47KB▼ 67.00%
assets/screenshot-2.png116.83KB39.79KB▼ 65.94%
assets/banner-772x250.png120.89KB52.13KB▼ 56.88%