10% codebard-help-desk

Code Review | CodeBard Help Desk

WordPress plugin CodeBard Help Desk scored10%from 54 tests.

About plugin

  • Plugin page: codebard-help-desk
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jan 8, 2017
  • Latest release: Apr 20, 2023
  • Number of updates: 56
  • Update frequency: every 40.9 days
  • Top authors: CodeBard (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,064 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲1.09MB] [CPU: ▼4.20ms] Passed 4 tests

A check of server-side resources used by CodeBard Help Desk
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.56 ▲1.1054.33 ▲13.28
Dashboard /wp-admin4.39 ▲1.0854.43 ▲1.15
Posts /wp-admin/edit.php4.44 ▲1.0965.49 ▲15.02
Add New Post /wp-admin/post-new.php6.99 ▲1.1093.66 ▼40.55
Media Library /wp-admin/upload.php4.31 ▲1.0848.55 ▲9.34
Add new /wp-admin/post-new.php?post_type=cb_p3_ticket4.4463.02
Departments /wp-admin/edit-tags.php?taxonomy=cb_p3_support&post_type=cb_p3_ticket4.3244.39
Tickets /wp-admin/edit.php?post_type=cb_p3_ticket4.3646.24

Server storage [IO: ▲0.46MB] [DB: ▲0.09MB] 67% from 3 tests

A short overview of filesystem and database impact
These are issues you should consider
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/codebard-help-desk/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 84 new files
Database: 8 new tables, 12 new options
New tables
wp_cb_p3_int
wp_cb_p3_decimal
wp_cb_p3_department
wp_cb_p3_attachment
wp_cb_p3_date
wp_cb_p3_text
wp_cb_p3_reply
wp_cb_p3_longtext
New WordPress options
widget_theysaidso_widget
cb_p3_lang_en-US
widget_recent-comments
db_upgraded
widget_codebard_help_desk_sidebar_user_widget
cb_p3_lang_es-ES
cb_p3_options
cb_p3_support_children
cb_p3_lang_hi-IN
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by CodeBard Help Desk
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲12813.21 ▼1.191.92 ▲0.1541.03 ▲2.39
Dashboard /wp-admin2,253 ▲535.05 ▲0.1798.61 ▼10.2070.42 ▲28.00
Posts /wp-admin/edit.php2,147 ▲502.03 ▲0.0241.57 ▲1.2238.68 ▲2.59
Add New Post /wp-admin/post-new.php1,569 ▲4323.04 ▲5.48756.78 ▲90.4156.20 ▼2.50
Media Library /wp-admin/upload.php1,444 ▲444.25 ▲0.06104.23 ▼2.4874.64 ▲27.60
Add new /wp-admin/post-new.php?post_type=cb_p3_ticket2,4787.84191.36132.01
Departments /wp-admin/edit-tags.php?taxonomy=cb_p3_support&post_type=cb_p3_ticket1,4242.3228.3239.55
Tickets /wp-admin/edit.php?post_type=cb_p3_ticket1,1191.9632.5933.65

Uninstaller [IO: ▲0.00MB] [DB: ▲0.09MB] 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
    • > Notice in wp-content/plugins/codebard-help-desk/uninstall.php+53
    Undefined index: prefix
  • Zombie tables detected upon uninstall: 8 tables
    • wp_cb_p3_department
    • wp_cb_p3_int
    • wp_cb_p3_attachment
    • wp_cb_p3_date
    • wp_cb_p3_decimal
    • wp_cb_p3_reply
    • wp_cb_p3_text
    • wp_cb_p3_longtext
  • Zombie WordPress options were found after uninstall: 12 options
    • cb_p3_lang_hi-IN
    • cb_p3_support_children
    • db_upgraded
    • cb_p3_lang_es-ES
    • cb_p3_lang_en-US
    • cb_p3_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • ...

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 | 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
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/codebard-help-desk/plugin/includes/setting_sections/reset_settings_form.php
    • > /wp-content/plugins/codebard-help-desk/plugin/includes/setting_sections/admin_settings_page_footer.php
    • > /wp-content/plugins/codebard-help-desk/plugin/includes/setting_sections/admin_settings_form_header.php
    • > /wp-content/plugins/codebard-help-desk/plugin/includes/setting_sections/dashboard_general_magical.php
    • > /wp-content/plugins/codebard-help-desk/plugin/includes/setting_sections/admin_settings_form_footer.php
    • > /wp-content/plugins/codebard-help-desk/plugin/includes/setting_sections/admin_settings_page_header.php
  • 22× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/codebard-help-desk/core/includes/default_internal_vars.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/codebard-help-desk/plugin/includes/setting_sections/sidebar_widgets.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/codebard-help-desk/plugin/includes/default_internal_vars.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/codebard-help-desk/plugin/includes/setting_sections/departments.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/codebard-help-desk/plugin/includes/hardcoded_vars.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/codebard-help-desk/plugin/includes/setting_sections/addons.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/codebard-help-desk/plugin/includes/setting_sections/general.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/codebard-help-desk/plugin/includes/default_options.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/codebard-help-desk/plugin/includes/setting_sections/staff.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/codebard-help-desk/plugin/includes/setting_sections/extras.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: tickets, help desk, support ticket system, help desk system, support tickets...

codebard-help-desk/index.php 69% from 13 tests

The entry point to "CodeBard Help Desk" version 1.1.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/lang" does not exist
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: The principal plugin file should be the same as the plugin slug ("codebard-help-desk.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 187 characters long)

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
Success! There were no dangerous files found in this plugin7,700 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP313,5775846,924
CSS22710563
Smarty243419173
JavaScript1332140

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity155.60
▷ Minimum class complexity1.00
▷ Maximum class complexity401.00
Average method complexity4.90
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods198
▷ Static methods10.51%
▷ Public methods19698.99%
▷ Protected methods00.00%
▷ Private methods21.01%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/help-desk-name-only-logo.png4.90KB1.90KB▼ 61.12%
images/patreon-medium-button.png8.85KB3.75KB▼ 57.61%
images/logo.png10.84KB5.57KB▼ 48.62%
images/woo_logo.png24.50KB9.82KB▼ 59.91%
images/admin_delete_icon.png0.49KB0.43KB▼ 10.82%