62% td-ticket-system

Code Review | TD Ticket System

WordPress plugin TD Ticket System scored62%from 54 tests.

About plugin

  • Plugin page: td-ticket-system
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Jan 23, 2014
  • Latest release: Feb 25, 2014
  • Number of updates: 29
  • Update frequency: every 1.1 days
  • Top authors: transcendev (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10+ active /3,308 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼3.56ms] Passed 4 tests

Analyzing server-side resources used by TD Ticket System
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2448.93 ▲2.74
Dashboard /wp-admin3.52 ▲0.1765.28 ▼3.66
Posts /wp-admin/edit.php3.63 ▲0.2855.68 ▲6.10
Add New Post /wp-admin/post-new.php6.10 ▲0.2188.22 ▼14.25
Media Library /wp-admin/upload.php3.44 ▲0.2141.45 ▲0.93
Templates /wp-admin/admin.php?page=tdtts10_23.4240.67
Ticket System /wp-admin/admin.php?page=tdtts103.4138.20
Settings /wp-admin/admin.php?page=tdtts10_13.4132.40

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 30 new files
Database: 4 new tables, 13 new options
New tables
wp_td_tts_messages
wp_td_tts_departments
wp_td_tts_responses
wp_td_tts_settings
New WordPress options
widget_theysaidso_widget
td_tts_styles
can_compress_scripts
td_tts_contactForm
td_tts_loginForm
theysaidso_admin_options
td_tts_successPage
td_tts_db_version
widget_recent-posts
td_tts_responsenote
...

Browser metrics Passed 4 tests

An overview of browser requirements for TD Ticket System
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲19513.65 ▼0.7212.10 ▲9.8342.79 ▲2.31
Dashboard /wp-admin2,227 ▲475.76 ▲0.2390.63 ▼0.6179.01 ▲38.87
Posts /wp-admin/edit.php2,140 ▲372.22 ▲0.2135.15 ▼2.6340.08 ▲2.21
Add New Post /wp-admin/post-new.php1,571 ▲16718.20 ▼0.20644.39 ▲7.79166.85 ▲119.45
Media Library /wp-admin/upload.php1,438 ▲414.51 ▲0.29101.01 ▼48.9273.44 ▲9.71
Templates /wp-admin/admin.php?page=tdtts10_29391.9126.7030.09
Ticket System /wp-admin/admin.php?page=tdtts108671.9333.0127.92
Settings /wp-admin/admin.php?page=tdtts10_11,0091.9228.4531.45

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie tables were found after uninstall: 4 tables
    • wp_td_tts_messages
    • wp_td_tts_responses
    • wp_td_tts_settings
    • wp_td_tts_departments
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • td_tts_notification
    • td_tts_db_version
    • can_compress_scripts
    • db_upgraded
    • td_tts_responsenote
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • td_tts_contactForm
    • td_tts_styles
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Almost there! Just fix the following items
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/td-ticket-system/includes/default_responsenotification.php
    • > /wp-content/plugins/td-ticket-system/includes/default_emailnotification.php
    • > /wp-content/plugins/td-ticket-system/includes/default_form.php
    • > /wp-content/plugins/td-ticket-system/includes/default_success.php
    • > /wp-content/plugins/td-ticket-system/includes/default_login.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/td-ticket-system/td-ticketsystem.php:30

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tdtts10_1
    • > Network (severe)
    http://../wp-content/plugins/td-ticket-system/images/icon.png - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tdtts10_1
    • > Network (severe)
    wp-admin/%3C?%20echo%20TDPLUGINURL%20?%3Eincludes/smoothness/jquery-ui-1.10.4.custom.min.css - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === td-ticket-system === )
The official readme.txt might help

td-ticket-system/td-ticketsystem.php 92% from 13 tests

This is the main PHP file of "TD Ticket System" version 1.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("td-ticket-system.php" instead of "td-ticketsystem.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin2,120 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP71851791,396
CSS32335658
JavaScript12066

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions38
▷ Named functions38100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%
includes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
includes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
includes/smoothness/images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%
includes/smoothness/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%