46% ucare-support-system

Code Review | uCare - Support Ticket System & HelpDesk

WordPress plugin uCare - Support Ticket System & HelpDesk scored 46% from 54 tests.

About plugin

  • Plugin page: ucare-support-system
  • Plugin version: 1.7.2
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0.0
  • WordPress version: 5.9.2
  • First release: Jan 17, 2017
  • Latest release: Dec 11, 2018
  • Number of updates: 87
  • Update frequency: every 7.9 days
  • Top authors: smartcat (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

1,000+ active / 73,076 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.45MB] [CPU: ▼331.21ms] Passed 4 tests

This is a short check of server-side resources used by uCare - Support Ticket System & HelpDesk
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.42 ▼0.0912.27 ▼36.44
Dashboard /wp-admin4.11 ▲0.7016.27 ▼16.63
Posts /wp-admin/edit.php4.11 ▲0.4718.68 ▼16.05
Add New Post /wp-admin/post-new.php4.11 ▼2.8615.30 ▼1,255.70
Media Library /wp-admin/upload.php4.11 ▲0.8114.70 ▼13.71
Menus /wp-admin/nav-menus.php4.1115.52
Ticket Categories /wp-admin/edit-tags.php?post_type=support_ticket&taxonomy=ticket_category4.1217.21
Settings /wp-admin/admin.php?page=uc-settings4.1117.14
uCare - Introduction /wp-admin/admin.php?page=ucare-tutorial4.1116.28
Create Ticket /wp-admin/post-new.php?post_type=support_ticket4.1115.99
Email Templates /wp-admin/edit.php?post_type=email_template4.1216.63
Reports /wp-admin/admin.php?page=ucare_support4.1116.26
Support Tickets /wp-admin/edit.php?post_type=support_ticket4.1216.77
Add-ons /wp-admin/admin.php?page=ucare-add-ons4.1115.73

Server storage [IO: ▲4.11MB] [DB: ▲0.20MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 317 new files
Database: 1 new table, 17 new options
New tables
wp_ucare_logs
New WordPress options
smartcat_support_password-reset-email
smartcat_support_ticket-assigned
smartcat_support_create_ticket_page_id
smartcat_support_closed-email-template
smartcat_support_db_version
smartcat_support_ticket-created-email
smartcat_support_welcome-email-template
smartcat_support_inactive-email
smartcat_support_customer-reply
ucare_expired_licenses
...

Browser metrics Passed 4 tests

Checking browser requirements for uCare - Support Ticket System & HelpDesk
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,060 ▲30616.17 ▲0.505.82 ▼0.275.24 ▲2.37
Dashboard /wp-admin3,157 ▲2996.84 ▲0.66117.80 ▼17.08178.63 ▲16.64
Posts /wp-admin/edit.php2,953 ▲2623.30 ▲0.0665.14 ▲0.16170.29 ▲26.53
Add New Post /wp-admin/post-new.php1,838 ▲17017.50 ▼1.07391.75 ▲1.12187.22 ▲33.68
Media Library /wp-admin/upload.php1,961 ▲2666.02 ▲0.48116.49 ▼27.91197.61 ▲4.96
Menus /wp-admin/nav-menus.php3,7793.95100.07153.50
Ticket Categories /wp-admin/edit-tags.php?post_type=support_ticket&taxonomy=ticket_category2,0893.6676.71122.70
Settings /wp-admin/admin.php?page=uc-settings2,3425.2389.76198.48
uCare - Introduction /wp-admin/admin.php?page=ucare-tutorial2,48813.63516.80198.00
Create Ticket /wp-admin/post-new.php?post_type=support_ticket4302.7629.8547.60
Email Templates /wp-admin/edit.php?post_type=email_template3,4283.1167.07156.97
Reports /wp-admin/admin.php?page=ucare_support2,5955.6093.68148.57
Support Tickets /wp-admin/edit.php?post_type=support_ticket9943.6550.7174.47
Add-ons /wp-admin/admin.php?page=ucare-add-ons1,9176.09109.23166.00

Uninstaller [IO: ▲0.00MB] [DB: ▲0.20MB] 25% 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 did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/ucare-support-system/includes/library/theme-showcase.php+42
    define(): Declaration of case-insensitive constants is deprecated
  • Zombie tables detected upon uninstall: 1 table
    • wp_ucare_logs
  • Zombie WordPress options were found after uninstall: 17 options
    • smartcat_support_login_page_id
    • smartcat_support_ticket-created-email
    • smartcat_support_edit_profile_page_id
    • smartcat_support_page-id
    • smartcat_support_inactive-email
    • smartcat_support_first-160-run
    • smartcat_support_db_version
    • smartcat_support_welcome-email-template
    • smartcat_support_create_ticket_page_id
    • smartcat_support_reply-template
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 30 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ucare-add-ons
    • > Deprecated in wp-content/plugins/ucare-support-system/includes/library/theme-showcase.php+46
    define(): Declaration of case-insensitive constants is deprecated
  • 45 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ucare-add-ons
    • > User notice in wp-includes/functions.php+5768
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=support_ticket
    • > User notice in wp-includes/functions.php+5768
    is_feed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

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
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ucare-support-system/templates/underscore/tmpl-ajax-loader-mask.php
    • > /wp-content/plugins/ucare-support-system/templates/underscore/tmpl-confirm-modal.php
    • > /wp-content/plugins/ucare-support-system/templates/underscore/tmpl-notice-inline.php
    • > /wp-content/plugins/ucare-support-system/templates/comments.php
  • 126× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Trait 'ucare\\Singleton' not found in wp-content/plugins/ucare-support-system/includes/class-api.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ucare\\_e() in wp-content/plugins/ucare-support-system/templates/ticket_list.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'smartcat\\admin\\ValidationFilter' not found in wp-content/plugins/ucare-support-system/lib/admin/HTMLFilter.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'smartcat\\admin\\MenuPage' not found in wp-content/plugins/ucare-support-system/lib/admin/SettingsPage.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ucare\\current_user_can() in wp-content/plugins/ucare-support-system/templates/dash.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ucare\\add_action() in wp-content/plugins/ucare-support-system/includes/functions-template.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ucare\\get_option() in wp-content/plugins/ucare-support-system/templates/partials/navbar.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/ucare-support-system/templates/comment.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ucare\\util\\list_agents() in wp-content/plugins/ucare-support-system/config/ticket_properties_form.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'smartcat\\form\\AbstractField' not found in wp-content/plugins/ucare-support-system/lib/form/CheckBoxField.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=uc-settings
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=uc-settings 393 The specified value "application/pdf,application/zip,text/csv" cannot be parsed, or is out of range.
    • > GET request to /wp-admin/post-new.php?post_type=support_ticket
    • > Javascript (severe) in unknown
    /wp-content/plugins/ucare-support-system/assets/js/dropzone/dropzone.min.js?ver=1.7.2 0:1966 Uncaught Error: No URL provided.
    • > GET request to /wp-admin/post-new.php?post_type=support_ticket
    • > Javascript (severe) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.6.0 1:31702 Uncaught Error: Dropzone already attached.
    • > GET request to /wp-admin/admin.php?page=ucare-add-ons
    • > Network (severe)
    https://ucaresupport.com/wp-content/uploads/edd/2018/05/ucare-auto-agent.png - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/admin.php?page=ucare-add-ons
    • > Network (severe)
    https://ucaresupport.com/wp-content/uploads/edd/2018/05/ucare-custom-fields.png - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/admin.php?page=ucare-add-ons
    • > Network (severe)
    https://ucaresupport.com/wp-content/uploads/edd/2018/05/ucare-social-login.png - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/admin.php?page=ucare-add-ons
    • > Network (severe)
    https://ucaresupport.com/wp-content/uploads/edd/2018/05/ucare-woocommerce.png - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/admin.php?page=ucare-add-ons
    • > Network (severe)
    https://ucaresupport.com/wp-content/uploads/edd/2018/05/ucare-slack.png - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/admin.php?page=ucare-add-ons
    • > Network (severe)
    https://ucaresupport.com/wp-content/uploads/edd/2018/05/ucare-edd.png - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/admin.php?page=ucare-add-ons
    • > Network (severe)
    https://ucaresupport.com/wp-content/uploads/edd/2018/05/ucare-pro.png - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/admin.php?page=ucare-add-ons
    • > Network (severe)
    https://ucaresupport.com/wp-content/uploads/edd/2018/05/ucare-private-notes.png - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/admin.php?page=ucare-add-ons
    • > Network (severe)
    https://ucaresupport.com/wp-content/uploads/edd/2018/05/ucare-agent-assignment.png - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/admin.php?page=ucare-add-ons
    • > Network (severe)
    https://ucaresupport.com/wp-content/uploads/edd/2018/05/ucare-email-piping.png - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/admin.php?page=ucare-add-ons
    • > Network (severe)
    https://ucaresupport.com/wp-content/uploads/edd/2018/05/ucare-knowledge-base-1.png - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/admin.php?page=ucare-add-ons
    • > Network (severe)
    https://ucaresupport.com/wp-content/uploads/edd/2018/05/ucare-mailchimp.png - Failed to load resource: the server responded with a status of 403 ()
    • > GET request to /wp-admin/admin.php?page=ucare-add-ons
    • > Network (severe)
    https://ucaresupport.com/wp-content/uploads/edd/2018/05/ucare-customer-satisfaction.jpg - Failed to load resource: the server responded with a status of 403 ()

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

ucare-support-system/plugin.php 85% from 13 tests

The main PHP script in "uCare - Support Ticket System & HelpDesk" version 1.7.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ucare-support-system.php" instead of "plugin.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 231 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected47,806 lines of code in 275 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript653,9403,68216,892
PHP1614,6095,96212,941
CSS2151838710,405
PO File62,7622,9526,284
HTML93018510
SVG300346
Markdown1460218
Sass6320166
JSON30044

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.88
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces15
Interfaces7
Traits2
Classes65
▷ Abstract classes710.77%
▷ Concrete classes5889.23%
▷ Final classes610.34%
Methods351
▷ Static methods154.27%
▷ Public methods28280.34%
▷ Protected methods3911.11%
▷ Private methods308.55%
Functions374
▷ Named functions35294.12%
▷ Anonymous functions225.88%
Constants79
▷ Global constants1721.52%
▷ Class constants6278.48%
▷ Public constants62100.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
12 PNG files occupy 0.27MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/slack-icon.png7.91KB4.95KB▼ 37.34%
assets/lib/lightGallery/img/youtube-play.png5.06KB2.37KB▼ 53.04%
assets/images/favicon.png4.61KB2.42KB▼ 47.51%
assets/images/file-icon.png1.16KB1.92KB0.00%
assets/images/ucare-auto-agent.png22.92KB9.13KB▼ 60.17%