10% ticket-press

Code Review | TicketPress

WordPress plugin TicketPress scored10%from 54 tests.

About plugin

  • Plugin page: ticket-press
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3.1
  • WordPress version: 6.3.1
  • First release: Dec 3, 2015
  • Latest release: Dec 22, 2015
  • Number of updates: 17
  • Update frequency: every 1.1 days
  • Top authors: abiralneupane (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,499 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/ticket-press/includes/tp-install.php+26
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.23MB] [CPU: ▼1.93ms] Passed 4 tests

Analyzing server-side resources used by TicketPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2442.69 ▼1.07
Dashboard /wp-admin3.53 ▲0.2350.10 ▼3.85
Posts /wp-admin/edit.php3.65 ▲0.2958.59 ▲5.05
Add New Post /wp-admin/post-new.php6.12 ▲0.2392.43 ▼1.21
Media Library /wp-admin/upload.php3.45 ▲0.2339.85 ▼1.57
Add New /wp-admin/post-new.php?post_type=tp-tickets3.6760.28
Tickets /wp-admin/edit.php?post_type=tp-tickets3.5049.48
Scope /wp-admin/edit-tags.php?taxonomy=tp-ticket-scope&post_type=tp-tickets3.4544.73

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
tp_general
widget_recent-posts
tp_display
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for TicketPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲10114.76 ▲0.351.89 ▼0.1450.30 ▲6.82
Dashboard /wp-admin2,225 ▲375.85 ▼0.05106.29 ▼4.2246.75 ▼9.28
Posts /wp-admin/edit.php2,132 ▲402.03 ▼0.0240.79 ▼2.6137.74 ▼6.29
Add New Post /wp-admin/post-new.php1,570 ▲5123.11 ▲1.97699.81 ▼19.5751.44 ▲3.08
Media Library /wp-admin/upload.php1,428 ▲404.16 ▲0.05114.16 ▼3.7150.30 ▼2.24
Add New /wp-admin/post-new.php?post_type=tp-tickets2,6617.79204.9875.03
Tickets /wp-admin/edit.php?post_type=tp-tickets1,1432.0137.8432.43
Scope /wp-admin/edit-tags.php?taxonomy=tp-ticket-scope&post_type=tp-tickets1,3052.1432.2331.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • tp_display
    • can_compress_scripts
    • tp_general
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% 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)
Good news, no errors were detected

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× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ticket-press/unistall.php
    • > /wp-content/plugins/ticket-press/ticketpress.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_comments() in wp-content/plugins/ticket-press/templates/ticket-comments.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/ticket-press/includes/functions.helpers.php:115
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ticket-press/templates/no-access.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/ticket-press/templates/new-ticket.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ticket-press/includes/form_actions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ticket-press/templates/single-ticket.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_ticket_arguments() in wp-content/plugins/ticket-press/templates/my-tickets.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 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
8 plugin tags: ticket system, ticket press, wp support, support system, support...

ticket-press/ticketpress.php 77% from 13 tests

The principal PHP file in "TicketPress" v. 1.4.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ticket-press.php" instead of "ticketpress.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,374 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP1715313968
CSS36112406

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.00
▷ Minimum class complexity5.00
▷ Maximum class complexity19.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin