68% aistore-support-ticket

Code Review | Aistore Support Ticket

WordPress plugin Aistore Support Ticket scored68%from 54 tests.

About plugin

  • Plugin page: aistore-support-t...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 14, 2021
  • Latest release: Jul 21, 2022
  • Number of updates: 10
  • Update frequency: every 31.0 days
  • Top authors: susheelhbti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /368 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by Aistore Support Ticket
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1441.70 ▲4.09
Dashboard /wp-admin3.43 ▲0.1353.85 ▲1.89
Posts /wp-admin/edit.php3.57 ▲0.2155.48 ▲6.57
Add New Post /wp-admin/post-new.php5.58 ▼0.3175.88 ▼20.81
Media Library /wp-admin/upload.php3.35 ▲0.1135.06 ▼0.64
Setting /wp-admin/admin.php?page=aistore_page_setting3.3434.93
Ticket List /wp-admin/admin.php?page=support_ticket_list3.3237.22
Live Chat /wp-admin/admin.php?page=support_ticket_live_chat3.3231.66

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: 2 new tables, 6 new options
New tables
wp_support_ticket_message
wp_support_ticket
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Aistore Support Ticket
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲12513.34 ▼1.421.97 ▼0.0943.36 ▼4.93
Dashboard /wp-admin2,241 ▲534.92 ▲0.02118.14 ▲1.9240.51 ▼4.99
Posts /wp-admin/edit.php2,127 ▲352.04 ▲0.0144.91 ▲4.4832.48 ▼5.65
Add New Post /wp-admin/post-new.php1,565 ▲3223.06 ▲0.08606.05 ▼37.9251.43 ▼7.96
Media Library /wp-admin/upload.php1,423 ▲414.25 ▲0.05106.42 ▲8.5441.78 ▲1.29
Setting /wp-admin/admin.php?page=aistore_page_setting9082.1129.2824.34
Ticket List /wp-admin/admin.php?page=support_ticket_list7602.1137.5427.12
Live Chat /wp-admin/admin.php?page=support_ticket_live_chat8192.1131.4423.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_support_ticket_message
    • wp_support_ticket
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=support_ticket_live_chat
    • > Notice in wp-content/plugins/aistore-support-ticket/AistoreAdminAjax.php+24
    Undefined index: tid
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=support_ticket_live_chat
    • > Notice in wp-content/plugins/aistore-support-ticket/AistoreAdminAjax.php+172
    Undefined index: ticket_id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=support_ticket_live_chat
    • > Notice in wp-content/plugins/aistore-support-ticket/AistoreSettingsPage.class.php+668
    Trying to get property 'status' of non-object
    • > GET request to /wp-admin/admin.php?page=support_ticket_live_chat
    • > Notice in wp-content/plugins/aistore-support-ticket/AistoreSettingsPage.class.php+660
    Trying to get property 'ID' of non-object
    • > GET request to /wp-admin/admin.php?page=support_ticket_live_chat
    • > Notice in wp-content/plugins/aistore-support-ticket/AistoreSettingsPage.class.php+663
    Trying to get property 'category' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/aistore-support-ticket/AistoreSettingsPage.class.php:715
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/aistore-support-ticket/index.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aistore-support-ticket/AistoreAdminAjax.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: simple support ticket system, aistore support ticket, aistore, support ticket system design, best ticketing system...

aistore-support-ticket/index.php 92% from 13 tests

The main PHP script in "Aistore Support Ticket" version 1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("aistore-support-ticket.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin728 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP481348728

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity23.50
▷ Minimum class complexity21.00
▷ Maximum class complexity26.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods330.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
No PNG files were detected