62% freshdesk-support

Code Review | Freshdesk (official)

WordPress plugin Freshdesk (official) scored62%from 54 tests.

About plugin

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /38,101 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▼2.12ms] Passed 4 tests

This is a short check of server-side resources used by Freshdesk (official)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.25 ▲0.7843.04 ▲6.31
Dashboard /wp-admin3.60 ▲0.3042.98 ▼4.11
Posts /wp-admin/edit.php3.79 ▲0.4247.85 ▼3.51
Add New Post /wp-admin/post-new.php6.27 ▲0.3881.27 ▼7.17
Media Library /wp-admin/upload.php3.59 ▲0.3653.59 ▲17.66
Add Client /wp-admin/admin.php?page=wo_add_client3.5633.84
Settings /wp-admin/admin.php?page=wo_settings3.5634.19
Basic Settings /wp-admin/admin.php?page=freshdesk-menu-handle3.5632.53
Edit Clients /wp-admin/admin.php?page=wo_edit_client3.5632.86
SSO Integration /wp-admin/admin.php?page=wo_manage_clients3.5835.18

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 124 new files
Database: 6 new tables, 8 new options
New tables
wp_oauth_jwt
wp_oauth_public_keys
wp_oauth_refresh_tokens
wp_oauth_scopes
wp_oauth_authorization_codes
wp_oauth_access_tokens
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
wo_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
wpoauth_version

Browser metrics Passed 4 tests

A check of browser resources used by Freshdesk (official)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9113.42 ▼1.131.54 ▼0.1045.73 ▲5.79
Dashboard /wp-admin2,238 ▲505.20 ▲0.17103.98 ▲2.2140.67 ▼2.79
Posts /wp-admin/edit.php2,124 ▲532.34 ▲0.2934.01 ▼0.7440.33 ▲3.61
Add New Post /wp-admin/post-new.php1,544 ▲2523.36 ▲0.25658.09 ▼59.3060.33 ▲3.56
Media Library /wp-admin/upload.php1,423 ▲354.42 ▲0.2199.02 ▼4.7845.93 ▼1.10
Add Client /wp-admin/admin.php?page=wo_add_client9212.2326.5942.86
Settings /wp-admin/admin.php?page=wo_settings1,0752.3733.0751.65
Basic Settings /wp-admin/admin.php?page=freshdesk-menu-handle8681.8827.0027.56
Edit Clients /wp-admin/admin.php?page=wo_edit_client7781.9224.8019.40
SSO Integration /wp-admin/admin.php?page=wo_manage_clients9382.1025.9827.15

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie tables were found after uninstall: 6 tables
    • wp_oauth_scopes
    • wp_oauth_refresh_tokens
    • wp_oauth_authorization_codes
    • wp_oauth_jwt
    • wp_oauth_access_tokens
    • wp_oauth_public_keys
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • wo_options
    • db_upgraded
    • wpoauth_version

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please fix the following
  • 8× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/freshdesk-support/oauth/wp-oauth-server.php
    • > /wp-content/plugins/freshdesk-support/oauth/library/class-wo-table.php
    • > /wp-content/plugins/freshdesk-support/oauth/includes/admin/tabs/support.php
    • > /wp-content/plugins/freshdesk-support/oauth/includes/functions.php
    • > /wp-content/plugins/freshdesk-support/oauth/includes/admin/tabs/license.php
    • > /wp-content/plugins/freshdesk-support/oauth/library/WPOAuth2/Server.php
    • > /wp-content/plugins/freshdesk-support/oauth/wp-oauth-main.php
    • > /wp-content/plugins/freshdesk-support/oauth/library/class-wo-api.php
  • 57× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPOAuth2\\ResponseType\\AccessToken' not found in wp-content/plugins/freshdesk-support/oauth/library/WPOAuth2/ResponseType/JwtAccessToken.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'WPOAuth2\\Storage\\AuthorizationCodeInterface' not found in wp-content/plugins/freshdesk-support/oauth/library/WPOAuth2/Storage/Mongo.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'WPOAuth2\\Storage\\JwtAccessTokenInterface' not found in wp-content/plugins/freshdesk-support/oauth/library/WPOAuth2/Storage/JwtAccessToken.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'WPOAuth2\\TokenType\\TokenTypeInterface' not found in wp-content/plugins/freshdesk-support/oauth/library/WPOAuth2/TokenType/Bearer.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'WPOAuth2\\Storage\\AuthorizationCodeInterface' not found in wp-content/plugins/freshdesk-support/oauth/library/WPOAuth2/Storage/Redis.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WPOAuth2\\Controller\\ResourceController' not found in wp-content/plugins/freshdesk-support/oauth/library/WPOAuth2/OpenID/Controller/UserInfoController.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'WPOAuth2\\GrantType\\GrantTypeInterface' not found in wp-content/plugins/freshdesk-support/oauth/library/WPOAuth2/GrantType/RefreshToken.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'WPOAuth2\\ResponseType\\ResponseTypeInterface' not found in wp-content/plugins/freshdesk-support/oauth/library/WPOAuth2/ResponseType/AuthorizationCodeInterface.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPOAuth2\\ResponseType\\AccessToken' not found in wp-content/plugins/freshdesk-support/oauth/library/WPOAuth2/ResponseType/CryptoToken.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'WPOAuth2\\Controller\\TokenControllerInterface' not found in wp-content/plugins/freshdesk-support/oauth/library/WPOAuth2/Controller/TokenController.php:17

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=freshdesk-menu-handle
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'checked')" "TypeError: Cannot read properties of null (reading 'checked')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/freshdesk-support/public/js/freshdesk_plugin_js.js?ver=6.3.1:63:53)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=freshdesk-menu-handle
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of null (reading 'checked')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: customer support software, freshdesk, knowledge base, freshdesk ticket, helpdesk...

freshdesk-support/fresh-desk.php 85% from 13 tests

This is the main PHP file of "Freshdesk (official)" version 2.3.4, 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:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("freshdesk-support.php" instead of "fresh-desk.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected9,108 lines of code in 107 files:
LanguageFilesBlank linesComment linesLines of code
PHP972,1353,5057,987
CSS3103164779
JavaScript53946213
PO File14043128
HTML1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity11.26
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces12
Interfaces33
Traits0
Classes45
▷ Abstract classes00.00%
▷ Concrete classes45100.00%
▷ Final classes00.00%
Methods584
▷ Static methods61.03%
▷ Public methods51287.67%
▷ Protected methods569.59%
▷ Private methods162.74%
Functions70
▷ Named functions6795.71%
▷ Anonymous functions34.29%
Constants20
▷ Global constants945.00%
▷ Class constants1155.00%
▷ Public constants11100.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.66MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
oauth/assets/images/openid-config-json.png104.42KB32.10KB▼ 69.26%
public/assets/screenshot-2.png303.53KB87.43KB▼ 71.20%
public/images/fd-menulogog.png1.34KB0.71KB▼ 46.95%
public/assets/screenshot-1.png254.82KB50.86KB▼ 80.04%
public/images/fd-menulogow.png1.31KB0.71KB▼ 45.72%