78% live-support-desk

Code Review | Live Support Desk

WordPress plugin Live Support Desk scored78%from 54 tests.

About plugin

  • Plugin page: live-support-desk
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0.1
  • WordPress version: 6.3.1
  • First release: Jul 23, 2015
  • Latest release: Oct 1, 2015
  • Number of updates: 44
  • Update frequency: every 1.9 days
  • Top authors: rcaddoux (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,481 total downloads

Benchmarks

Plugin footprint 83% 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.13MB] [CPU: ▼8.33ms] Passed 4 tests

Analyzing server-side resources used by Live Support Desk
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1537.61 ▼4.63
Dashboard /wp-admin3.44 ▲0.0943.63 ▼15.01
Posts /wp-admin/edit.php3.56 ▲0.2045.77 ▼5.57
Add New Post /wp-admin/post-new.php6.04 ▲0.1585.07 ▼8.12
Media Library /wp-admin/upload.php3.36 ▲0.1338.27 ▲1.37
Manage Roles /wp-admin/admin.php?page=bistri_desk_roles3.4135.03
Add Agent /wp-admin/admin.php?page=bistri_desk_agent_add3.4133.55
Live Support Desk /wp-admin/options-general.php?page=bistri_desk_settings3.4033.74
Manage Account /wp-admin/admin.php?page=bistri_desk_manage_plan3.3632.18
Add Role /wp-admin/admin.php?page=bistri_desk_role_add3.3830.56
Manage Agents /wp-admin/admin.php?page=bistri_desk_agents3.4132.02

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 146 new files
Database: 5 new tables, 14 new options
New tables
wp_bistri_desk_queue
wp_bistri_desk_agents_roles
wp_bistri_desk_agents
wp_bistri_desk_messages
wp_bistri_desk_roles
New WordPress options
widget_recent-posts
can_compress_scripts
bistri_desk_agents_roles_version
bistri_desk_queue_version
widget_recent-comments
bistri_desk_roles_version
bistri_desk_data_inserted
theysaidso_admin_options
bistri_desk_register_agent
bistri_desk_plugin_id
...

Browser metrics Passed 4 tests

A check of browser resources used by Live Support Desk
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲10713.23 ▼1.374.67 ▲2.4344.22 ▼5.78
Dashboard /wp-admin2,245 ▲605.87 ▲0.03101.24 ▼10.0375.52 ▲35.94
Posts /wp-admin/edit.php2,137 ▲482.00 ▼0.0337.98 ▼3.2833.70 ▼4.61
Add New Post /wp-admin/post-new.php1,546 ▲1323.83 ▲0.72595.48 ▼111.2351.44 ▼0.54
Media Library /wp-admin/upload.php1,421 ▲364.14 ▼0.0794.74 ▼13.6080.02 ▲37.00
Manage Roles /wp-admin/admin.php?page=bistri_desk_roles9432.0327.7526.69
Add Agent /wp-admin/admin.php?page=bistri_desk_agent_add9412.0225.7225.76
Live Support Desk /wp-admin/options-general.php?page=bistri_desk_settings9782.1923.3227.93
Manage Account /wp-admin/admin.php?page=bistri_desk_manage_plan8201.8723.9921.94
Add Role /wp-admin/admin.php?page=bistri_desk_role_add8502.0222.9226.46
Manage Agents /wp-admin/admin.php?page=bistri_desk_agents9302.0626.1524.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 13 options in the database
    • bistri_desk_agents_version
    • bistri_desk_messages_version
    • bistri_desk_queue_version
    • can_compress_scripts
    • bistri_desk_agents_roles_version
    • widget_recent-posts
    • bistri_desk_plugin_id
    • db_upgraded
    • bistri_desk_roles_version
    • widget_recent-comments
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 13× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/live-support-desk/debug/php-console-master/examples/features/handle_javascript_errors.php
    • > /wp-content/plugins/live-support-desk/debug/php-console-master/examples/features/protect_by_password.php
    • > /wp-content/plugins/live-support-desk/debug/php-console-master/examples/features/handle_errors.php
    • > /wp-content/plugins/live-support-desk/debug/php-console-master/examples/utils/test_jump_to_file.php
    • > /wp-content/plugins/live-support-desk/debug/php-console-master/examples/features/debug_vars.php
    • > /wp-content/plugins/live-support-desk/debug/php-console-master/examples/index.php
    • > /wp-content/plugins/live-support-desk/debug/php-console-master/examples/features/handle_on_redirect.php
    • > /wp-content/plugins/live-support-desk/debug/php-console-master/examples/features/eval_terminal.php
    • > /wp-content/plugins/live-support-desk/debug/php-console-master/examples/features/complex_usage_example.php
    • > /wp-content/plugins/live-support-desk/debug/php-console-master/examples/features/old_version_adapter.php
  • 87× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PhpConsole\\Dispatcher' not found in wp-content/plugins/live-support-desk/debug/php-console-master/src/PhpConsole/Dispatcher/Debug.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/live-support-desk/pages/add_agent.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/live-support-desk/classes/service.php:3
    • > PHP Notice
      Undefined variable: x in wp-content/plugins/live-support-desk/debug/php-console-master/tests/scripts/trigger_not_fatal_errors.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'PhpConsole\\Connector' not found in wp-content/plugins/live-support-desk/debug/php-console-master/tests/scripts/set_connector_auth.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/live-support-desk/pages/manage.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PhpConsole\\Test\\Storage' not found in wp-content/plugins/live-support-desk/debug/php-console-master/tests/Test/Storage/MongoDB.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/live-support-desk/services/message.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PhpConsole\\Test\\Remote\\Test' not found in wp-content/plugins/live-support-desk/debug/php-console-master/tests/Test/Remote/Auth.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/live-support-desk/pages/roles_list.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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:
  • Tags: Please reduce the number of tags, currently 36 tag instead of maximum 10
The official readme.txt might help

live-support-desk/bistri-desk.php 92% from 13 tests

The main PHP file in "Live Support Desk" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("live-support-desk.php" instead of "bistri-desk.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 detected6,736 lines of code in 117 files:
LanguageFilesBlank linesComment linesLines of code
PHP1061,1561,2046,158
JavaScript2819198
Markdown41020162
CSS2280146
JSON20042
XML13730

PHP code Passed 2 tests

This is a short overview 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.25
Average class complexity6.77
▷ Minimum class complexity1.00
▷ Maximum class complexity74.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes93
▷ Abstract classes1212.90%
▷ Concrete classes8187.10%
▷ Final classes911.11%
Methods514
▷ Static methods254.86%
▷ Public methods38374.51%
▷ Protected methods10921.21%
▷ Private methods224.28%
Functions43
▷ Named functions49.30%
▷ Anonymous functions3990.70%
Constants21
▷ Global constants29.52%
▷ Class constants1990.48%
▷ Public constants19100.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
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon_desk_bell_white_20x14.png1.10KB0.21KB▼ 80.62%
images/icon_desk_bell_grey_20x14.png1.09KB0.21KB▼ 80.46%
images/logo_64x64.png1.88KB0.58KB▼ 69.11%
images/notif_desk_32x32.png1.14KB0.19KB▼ 83.06%