79% scand-osticket-connector

Code Review | osTicket Connector

WordPress plugin osTicket Connector scored79%from 54 tests.

About plugin

  • Plugin page: scand-osticket-co...
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.2
  • WordPress version: 6.3.1
  • First release: Feb 17, 2017
  • Latest release: Apr 13, 2023
  • Number of updates: 27
  • Update frequency: every 83.2 days
  • Top authors: scandltd (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /7,821 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.28ms] Passed 4 tests

Analyzing server-side resources used by osTicket Connector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.91 ▼1.07
Dashboard /wp-admin3.39 ▲0.0848.16 ▼0.33
Posts /wp-admin/edit.php3.50 ▲0.1448.90 ▲3.20
Add New Post /wp-admin/post-new.php5.97 ▲0.0894.89 ▼2.01
Media Library /wp-admin/upload.php3.31 ▲0.0832.16 ▼1.71
osTicket Connector /wp-admin/options-general.php?page=scand-osticket-settings3.3332.36

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

osTicket Connector: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.69 ▼0.891.55 ▼0.2138.77 ▲0.91
Dashboard /wp-admin2,209 ▲205.80 ▲0.9198.97 ▼19.3540.12 ▼1.61
Posts /wp-admin/edit.php2,100 ▲82.09 ▲0.0440.32 ▼0.7736.65 ▼0.42
Add New Post /wp-admin/post-new.php1,524 ▲723.40 ▲5.72654.99 ▲58.2258.23 ▲9.41
Media Library /wp-admin/upload.php1,399 ▲114.16 ▲0.0095.98 ▼4.1942.64 ▲0.84
osTicket Connector /wp-admin/options-general.php?page=scand-osticket-settings1,1282.0826.1030.78

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/scand-osticket-connector/class-http-api.php
    • > /wp-content/plugins/scand-osticket-connector/scand-osticket-connector.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/scand-osticket-connector/admin-settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
9 plugin tags: support, rest api, connector, osticket, http...

scand-osticket-connector/scand-osticket-connector.php Passed 13 tests

"osTicket Connector" version 1.0.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
72 characters long description:
Create tickets in osTicket support system via the existing contact form.

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
Good job! No executable or dangerous file extensions detected647 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP46844540
PO File1384190
CSS12017

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity70.00
▷ Minimum class complexity70.00
▷ Maximum class complexity70.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods1555.56%
▷ Protected methods27.41%
▷ Private methods1037.04%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
No PNG images were found in this plugin