67% thrivedesk

Code Review | ThriveDesk - Live Chat, Help Desk & Knowledge Base for WordPress

WordPress plugin ThriveDesk - Live Chat, Help Desk & Knowledge Base for WordPress scored67%from 54 tests.

About plugin

  • Plugin page: thrivedesk
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 9, 2020
  • Latest release: Nov 27, 2023
  • Number of updates: 48
  • Update frequency: every 24.5 days
  • Top authors: thrivedesk (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /5,760 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 gracefully, with no errors

Server metrics [RAM: ▲0.35MB] [CPU: ▼2.37ms] 75% from 4 tests

A check of server-side resources used by ThriveDesk - Live Chat, Help Desk & Knowledge Base for WordPress
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 2,993.55ms on /wp-admin/options-general.php?page=thrivedesk-setting)
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3641.07 ▲0.80
Dashboard /wp-admin3.71 ▲0.3651.94 ▼11.90
Posts /wp-admin/edit.php3.76 ▲0.4051.58 ▲4.71
Add New Post /wp-admin/post-new.php6.25 ▲0.3796.34 ▲2.04
Media Library /wp-admin/upload.php3.57 ▲0.3436.91 ▼0.42
ThriveDesk /wp-admin/options-general.php?page=thrivedesk-setting7.262,993.55

Server storage [IO: ▲0.89MB] [DB: ▲0.42MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 77 new files
Database: 1 new table, 10 new options
New tables
wp_td_conversations
New WordPress options
can_compress_scripts
thrivedesk_installed
widget_theysaidso_widget
thrivedesk_options
widget_recent-posts
widget_recent-comments
thrivedesk_version
db_upgraded
theysaidso_admin_options
td_db_version

Browser metrics Passed 4 tests

ThriveDesk - Live Chat, Help Desk & Knowledge Base for WordPress: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4714.42 ▲0.111.65 ▼0.0438.11 ▼5.65
Dashboard /wp-admin2,202 ▲285.81 ▲0.2999.10 ▼7.1737.93 ▼4.80
Posts /wp-admin/edit.php2,106 ▲32.40 ▲0.4541.22 ▲0.7229.55 ▼4.64
Add New Post /wp-admin/post-new.php1,526 ▼423.66 ▲0.68598.71 ▼42.8163.63 ▼0.47
Media Library /wp-admin/upload.php1,404 ▲44.38 ▲0.1898.68 ▼7.3038.83 ▼7.54
ThriveDesk /wp-admin/options-general.php?page=thrivedesk-setting1,5522.0126.3038.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_td_conversations
  • This plugin does not fully uninstall, leaving 10 options in the database
    • thrivedesk_version
    • td_db_version
    • widget_recent-posts
    • widget_theysaidso_widget
    • thrivedesk_installed
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • thrivedesk_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 take a closer look at the following
  • 7× PHP files output text when accessed directly:
    • > /wp-content/plugins/thrivedesk/includes/views/icons/resource.php
    • > /wp-content/plugins/thrivedesk/includes/views/icons/close.php
    • > /wp-content/plugins/thrivedesk/includes/views/icons/integration.php
    • > /wp-content/plugins/thrivedesk/includes/views/icons/spinner.php
    • > /wp-content/plugins/thrivedesk/includes/views/icons/search.php
    • > /wp-content/plugins/thrivedesk/includes/views/icons/settings.php
    • > /wp-content/plugins/thrivedesk/includes/views/icons/back.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/thrivedesk/database/DBMigrator.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/thrivedesk/includes/helper.php:115
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/thrivedesk/includes/helper.php:115
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/thrivedesk/database/DBMigrator.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_td_helpdesk_options() in wp-content/plugins/thrivedesk/includes/views/pages/welcome.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/thrivedesk/database/DBMigrator.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/thrivedesk/includes/views/pages/resource.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ThriveDesk\\Plugins\\EDD' not found in wp-content/plugins/thrivedesk/includes/views/setting.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_td_helpdesk_options() in wp-content/plugins/thrivedesk/includes/views/pages/settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function thrivedesk_view() in wp-content/plugins/thrivedesk/includes/views/shortcode/modal.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4, #5, #6 in thrivedesk/assets to your readme.txt
You can take inspiration from this readme.txt

thrivedesk/thrivedesk.php 85% from 13 tests

The entry point to "ThriveDesk - Live Chat, Help Desk & Knowledge Base for WordPress" version 1.1.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Domain Path: The domain path must begin with a forward slash character ("/languages")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")

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
Good job! No executable or dangerous file extensions detected4,601 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
PHP478981,3643,766
JavaScript105426576
CSS42015213
Bourne Shell111035
JSON20011

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity17.36
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces11
Interfaces0
Traits0
Classes25
▷ Abstract classes14.00%
▷ Concrete classes2496.00%
▷ Final classes937.50%
Methods227
▷ Static methods5022.03%
▷ Public methods21092.51%
▷ Protected methods00.00%
▷ Private methods177.49%
Functions25
▷ Named functions936.00%
▷ Anonymous functions1664.00%
Constants29
▷ Global constants1344.83%
▷ Class constants1655.17%
▷ Public constants16100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.45MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/welcome.png158.87KB32.58KB▼ 79.49%
(invalid) assets/images/wppostsync.png15.95KB0.00KB▼ 100.00%
assets/images/thrivedesk.png17.26KB7.64KB▼ 55.74%
assets/images/woocommerce.png11.32KB4.43KB▼ 60.84%
assets/images/fluentcrm.png6.81KB2.84KB▼ 58.25%