72% osticket-wp-bridge

Code Review | osTicket WP Bridge

WordPress plugin osTicket WP Bridge scored72%from 54 tests.

About plugin

  • Plugin page: osticket-wp-bridge
  • Plugin version: 1.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 2, 2014
  • Latest release: Mar 7, 2014
  • Number of updates: 43
  • Update frequency: every 0.8 days
  • Top authors: michaelbo (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

40+ active /6,967 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼12.00ms] Passed 4 tests

An overview of server-side resources used by osTicket WP Bridge
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.09 ▼0.09
Dashboard /wp-admin3.34 ▼0.0048.54 ▼13.36
Posts /wp-admin/edit.php3.39 ▲0.0445.52 ▼18.87
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.45 ▼15.67
Media Library /wp-admin/upload.php3.26 ▲0.0439.88 ▲4.47
osT-Settings /wp-admin/admin.php?page=ost-settings3.2341.62
osT-Config /wp-admin/admin.php?page=ost-config3.2533.19
Email Templates /wp-admin/admin.php?page=ost-emailtemp3.2333.79
Support Tickets /wp-admin/admin.php?page=ost-tickets3.2333.24

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 63 new files
Database: 1 new table, 7 new options
New tables
wp_ost_emailtemp
New WordPress options
db_upgraded
os_ticket_config
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for osTicket WP Bridge
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.26 ▼1.121.72 ▼0.1443.10 ▼3.68
Dashboard /wp-admin2,240 ▲495.84 ▲0.97104.25 ▼5.4181.62 ▲38.69
Posts /wp-admin/edit.php2,123 ▲342.04 ▲0.0536.02 ▼1.4834.77 ▲1.86
Add New Post /wp-admin/post-new.php1,549 ▲1623.28 ▲0.04754.60 ▲110.0351.21 ▲6.17
Media Library /wp-admin/upload.php1,419 ▲314.24 ▲0.03101.13 ▼5.6152.52 ▲2.88
osT-Settings /wp-admin/admin.php?page=ost-settings8002.0226.6040.74
osT-Config /wp-admin/admin.php?page=ost-config9621.8624.1145.74
Email Templates /wp-admin/admin.php?page=ost-emailtemp7822.0226.8428.06
Support Tickets /wp-admin/admin.php?page=ost-tickets8002.0123.7524.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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
    • > GET request to /wp-admin/admin.php?page=ost-config
    • > Notice in wp-content/plugins/osticket-wp-bridge/admin/header_nav.php+17
    Undefined variable: active2
    • > GET request to /wp-admin/admin.php?page=ost-config
    • > Notice in wp-content/plugins/osticket-wp-bridge/admin/header_nav.php+18
    Undefined variable: active3
    • > GET request to /wp-admin/admin.php?page=ost-config
    • > Notice in wp-content/plugins/osticket-wp-bridge/admin/header_nav.php+19
    Undefined variable: active4

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/osticket-wp-bridge/includes/udscript.php
    • > /wp-content/plugins/osticket-wp-bridge/templates/pagination.php
    • > /wp-content/plugins/osticket-wp-bridge/includes/pagination.php
    • > /wp-content/plugins/osticket-wp-bridge/templates/list_tickets.php
  • 122× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: currentpage in wp-content/plugins/osticket-wp-bridge/templates/pagination.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/osticket-wp-bridge/templates/header.php:18
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/osticket-wp-bridge/admin/db-settings-17.php:12
    • > 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/osticket-wp-bridge/admin/ost-ticketview.php on line 6
    • > PHP Warning
      require_once(WP_PLUGIN_DIR/osticket-wp-bridge/includes/udscript.php): failed to open stream: No such file or directory in wp-content/plugins/osticket-wp-bridge/admin/ost-config.php on line 6
    • > PHP Notice
      Undefined index: adname in wp-content/plugins/osticket-wp-bridge/admin/ost-postreplymail.php on line 6
    • > PHP Notice
      Undefined variable: ticket_count_closed in wp-content/plugins/osticket-wp-bridge/templates/search.php on line 14
    • > PHP Notice
      Undefined variable: ost_wpdb in wp-content/plugins/osticket-wp-bridge/includes/versionData.php on line 2
    • > PHP Notice
      Undefined variable: currentpage in wp-content/plugins/osticket-wp-bridge/templates/pagination.php on line 10
    • > PHP Notice
      Undefined variable: currentpage in wp-content/plugins/osticket-wp-bridge/templates/pagination.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
7 plugin tags: bridge, email, support, tickets, helpdesk...

osticket-wp-bridge/ost-bridge.php 92% from 13 tests

This is the main PHP file of "osTicket WP Bridge" version 1.9.2, 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:
  • Main file name: Name the main plugin file the same as the plugin slug ("osticket-wp-bridge.php" instead of "ost-bridge.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin3,669 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP331602192,293
CSS311111,036
JavaScript54858340

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity2.00
▷ Minimum method complexity2.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
11 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/refresh.png1.31KB0.49KB▼ 63.02%
images/error.png0.71KB0.70KB▼ 1.92%
images/new.png1.55KB0.92KB▼ 40.49%
images/ok.png0.79KB0.81KB0.00%
images/check_status_icon.png4.90KB2.37KB▼ 51.59%