83% help-scout

Code Review | Help Scout

WordPress plugin Help Scout scored 83% from 54 tests.

About plugin

  • Plugin page: help-scout
  • Plugin version: 6.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Oct 14, 2016
  • Latest release: Aug 9, 2023
  • Number of updates: 53
  • Update frequency: every 47.0 days
  • Top authors: dancameron (84.91%)boldgrid (11.32%)avonville1 (5.66%)wvcody (3.77%)

Code review

54 tests

User reviews

5 reviews

Install metrics

700+ active / 16,965 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼1.47ms] Passed 4 tests

An overview of server-side resources used by Help Scout
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1644.40 ▲4.12
Dashboard /wp-admin3.45 ▲0.1548.62 ▲2.19
Posts /wp-admin/edit.php3.50 ▲0.1446.67 ▼0.35
Add New Post /wp-admin/post-new.php5.99 ▲0.1086.13 ▼11.76
Media Library /wp-admin/upload.php3.31 ▲0.0838.58 ▲4.05
Help Scout /wp-admin/options-general.php?page=help-scout-desk3.3232.42

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Help Scout
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.53 ▼0.721.71 ▼0.0642.10 ▼0.38
Dashboard /wp-admin2,214 ▲265.86 ▼0.0499.64 ▼3.8338.32 ▼3.25
Posts /wp-admin/edit.php2,100 ▲112.05 ▲0.0734.07 ▼6.6434.20 ▼0.29
Add New Post /wp-admin/post-new.php1,524 ▼1117.63 ▼5.68679.18 ▼7.4354.32 ▼11.04
Media Library /wp-admin/upload.php1,402 ▲144.21 ▼0.1496.53 ▼15.0540.95 ▼3.60
Help Scout /wp-admin/options-general.php?page=help-scout-desk9012.0723.9338.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'HSD_Controller' not found in wp-content/plugins/help-scout/controllers/Beacon.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'HSD_Controller' not found in wp-content/plugins/help-scout/controllers/Forms.php:10
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/help-scout/help-scout.php on line 22
    • > PHP Fatal error
      Uncaught Error: Class 'HSD_Controller' not found in wp-content/plugins/help-scout/languages/HSD_l10n.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/help-scout/views/admin/settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/help-scout/views/admin/sprout-apps-dashboard.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'HSD_Controller' not found in wp-content/plugins/help-scout/controllers/HelpScout_API.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/help-scout/views/shortcodes/success_message.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'HSD_Controller' not found in wp-content/plugins/help-scout/controllers/Settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/help-scout/views/shortcodes/conversation_form.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 83% 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:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Submission form), #2 (Beacon)
You can look at the official readme.txt

help-scout/help-scout.php 69% from 13 tests

The primary PHP file in "Help Scout" version 6.5.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path must begin with a forward slash character ("/languages")
  • Description: Keep the plugin description shorter than 140 characters (currently 278 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected2,895 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP153906131,772
CSS310840574
JavaScript26417288
PO File18298229
SVG10032

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity36.88
▷ Minimum class complexity1.00
▷ Maximum class complexity141.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes225.00%
▷ Concrete classes675.00%
▷ Final classes00.00%
Methods99
▷ Static methods99100.00%
▷ Public methods9595.96%
▷ Protected methods22.02%
▷ Private methods22.02%
Functions23
▷ Named functions1773.91%
▷ Anonymous functions626.09%
Constants44
▷ Global constants1227.27%
▷ Class constants3272.73%
▷ Public constants32100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.83MB with 0.60MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/admin/icons/sproutapps-flat.png306.90KB67.65KB▼ 77.96%
resources/admin/icons/sproutapps-flat-small.png38.53KB11.51KB▼ 70.11%
resources/admin/icons/sproutapps.png85.93KB21.03KB▼ 75.52%
screenshot-1.png312.46KB82.78KB▼ 73.51%
resources/admin/icons/sproutapps-flat-small-white.png26.72KB9.83KB▼ 63.21%