10% wdesk

Code Review | wdesk

WordPress plugin wdesk scored10%from 54 tests.

About plugin

  • Plugin page: wdesk
  • Plugin version: 0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 19, 2022
  • Latest release: Dec 9, 2022
  • Number of updates: 13
  • Update frequency: every 1.5 days
  • Top authors: wxkz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /188 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wdesk/shortcode/recover.php+3
    session_start(): A session had already been started - ignoring

Server metrics [RAM: ▼1.78MB] [CPU: ▼56.77ms] Passed 4 tests

An overview of server-side resources used by wdesk
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.21 ▼1.266.84 ▼34.48
Dashboard /wp-admin2.23 ▼1.087.37 ▼45.68
Posts /wp-admin/edit.php2.23 ▼1.137.41 ▼42.69
Add New Post /wp-admin/post-new.php2.23 ▼3.666.51 ▼104.21
Media Library /wp-admin/upload.php2.23 ▼1.007.44 ▼27.35
Tags /wp-admin/admin.php?page=wdesk_tags2.236.81
Departments /wp-admin/admin.php?page=wdesk_departments2.238.19
Tickets /wp-admin/admin.php?page=wdesk_tickets2.237.21
Reports /wp-admin/admin.php?page=wdesk_reports2.236.75
Settings /wp-admin/admin.php?page=wdesk_settings2.236.93

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 37 new files
Database: 8 new tables, 12 new options
New tables
wdesk_blocklist_email_providers
wdesk_departments_agents
wdesk_tags
wdesk_tickets
wdesk_users
wdesk_tickets_threads
wdesk_departments
wdesk_blocklist_emails
New WordPress options
widget_recent-posts
wdesk_max_subject
db_upgraded
wdesk_sender
wdesk_name
widget_theysaidso_widget
wdesk_max_thread
can_compress_scripts
theysaidso_admin_options
wdesk_url
...

Browser metrics Passed 4 tests

wdesk: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.34 ▼0.011.62 ▼0.1542.90 ▲0.53
Dashboard /wp-admin2,233 ▲535.59 ▼0.0887.43 ▼1.8841.26 ▼1.43
Posts /wp-admin/edit.php2,135 ▲382.01 ▲0.0337.83 ▼0.1635.91 ▲1.24
Add New Post /wp-admin/post-new.php1,554 ▲2821.93 ▼1.14667.72 ▼10.7355.00 ▲0.66
Media Library /wp-admin/upload.php1,432 ▲354.22 ▲0.0398.08 ▼5.0345.51 ▲3.03
Tags /wp-admin/admin.php?page=wdesk_tags8472.0327.7129.98
Departments /wp-admin/admin.php?page=wdesk_departments8492.0323.9026.85
Tickets /wp-admin/admin.php?page=wdesk_tickets8582.0123.9828.23
Reports /wp-admin/admin.php?page=wdesk_reports8392.0222.8227.23
Settings /wp-admin/admin.php?page=wdesk_settings1,0902.0021.6028.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wdesk/shortcode/recover.php+3
    session_start(): A session had already been started - ignoring
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wdesk_tickets
    • wdesk_departments
  • Zombie WordPress options were found after uninstall: 12 options
    • widget_recent-posts
    • wdesk_sender
    • wdesk_max_subject
    • wdesk_date_format
    • wdesk_max_thread
    • can_compress_scripts
    • wdesk_url
    • theysaidso_admin_options
    • db_upgraded
    • wdesk_name
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 25 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wdesk_settings
    • > Notice in wp-content/plugins/wdesk/shortcode/guest.php+3
    session_start(): A session had already been started - ignoring
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wdesk_reports
    • > User deprecated in wp-includes/functions.php+5737
    Function WP_User->id was called with an argument that is deprecated since version 2.1.0! Use WP_User->ID instead.

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
Almost there! Just fix the following items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wdesk/shortcode/sign-in.php
    • > /wp-content/plugins/wdesk/shortcode/components/scripts/masks.php
    • > /wp-content/plugins/wdesk/shortcode/access.php
    • > /wp-content/plugins/wdesk/shortcode/log-in.php
  • 25× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      require_once(WDESK_LOCALadmin/tickets/html.php): failed to open stream: No such file or directory in wp-content/plugins/wdesk/admin/tickets/tickets.php on line 2
    • > PHP Warning
      require_once(WDESK_LOCALadmin/reports/html.php): failed to open stream: No such file or directory in wp-content/plugins/wdesk/admin/reports/reports.php on line 2
    • > PHP Warning
      Use of undefined constant WDESK_LOCAL - assumed 'WDESK_LOCAL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wdesk/script/script.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'WDESK_LOCALadmin/departments/html.php' (include_path='.:/usr/share/php') in wp-content/plugins/wdesk/admin/departments/departments.php on line 2
    • > PHP Warning
      Use of undefined constant WDESK_LOCAL - assumed 'WDESK_LOCAL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wdesk/admin/settings/settings.php on line 2
    • > PHP Warning
      Use of undefined constant WDESK_LOCAL - assumed 'WDESK_LOCAL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wdesk/shortcode/shortcode.php on line 2
    • > PHP Warning
      require_once(WDESK_LOCALadmin/departments/html.php): failed to open stream: No such file or directory in wp-content/plugins/wdesk/admin/departments/departments.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'WDESK_LOCALadmin/tags/html.php' (include_path='.:/usr/share/php') in wp-content/plugins/wdesk/admin/tags/tags.php on line 2
    • > PHP Warning
      require_once(WDESK_LOCALadmin/settings/html.php): failed to open stream: No such file or directory in wp-content/plugins/wdesk/admin/settings/settings.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'WDESK_LOCALscript/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/wdesk/script/script.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: helpdesk, support

wdesk/index.php 92% from 13 tests

The main PHP script in "wdesk" version 0.5 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wdesk.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected2,323 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP32851031,991
PO File1115161249
Markdown116083

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin