66% tickera-event-ticketing-system

Code Review | Tickera - WordPress Event Ticketing

WordPress plugin Tickera - WordPress Event Ticketing scored66%from 54 tests.

About plugin

  • Plugin page: tickera-event-tic...
  • Plugin version: 3.5.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 24, 2014
  • Latest release: Nov 20, 2023
  • Number of updates: 221
  • Update frequency: every 14.9 days
  • Top authors: tickera (100%)

Code review

54 tests

User reviews

251 reviews

Install metrics

4,000+ active /262,526 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲7.42MB] [CPU: ▲43.49ms] 50% from 4 tests

This is a short check of server-side resources used by Tickera - WordPress Event Ticketing
Please have a look at the following items
  • RAM: Try to keep total memory usage under 10MB (currently 10.51MB on /wp-admin/index.php?page=tc-installation-wizard)
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 7.42MB on /wp-admin/index.php?page=tc-installation-wizard)
PageMemory (MB)CPU Time (ms)
Home /10.82 ▲7.3685.61 ▲47.21
Dashboard /wp-admin10.77 ▲7.42100.05 ▲35.74
Posts /wp-admin/edit.php10.87 ▲7.51111.58 ▲57.40
Add New Post /wp-admin/post-new.php13.59 ▲7.70129.62 ▲33.62
Media Library /wp-admin/upload.php10.63 ▲7.40122.21 ▲86.26
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius10.8282.51
/wp-admin/index.php?page=tc-installation-wizard10.5173.00

Server storage [IO: ▲28.56MB] [DB: ▲0.02MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • Filesystem usage must be lower than 25MB (currently using 28.56MB)
Filesystem: 760 new files
Database: no new tables, 13 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
fs_debug_mode
widget_tc_upcoming_events_widget
widget_tc_cart_widget
tc_settings
tc_version
fs_accounts
widget_recent-posts
can_compress_scripts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Tickera - WordPress Event Ticketing
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,255 ▲48315.39 ▲0.627.16 ▲5.2326.06 ▼18.96
Dashboard /wp-admin2,548 ▲3686.42 ▲0.77125.97 ▲28.6757.17 ▲11.73
Posts /wp-admin/edit.php2,419 ▲3193.84 ▲1.8362.04 ▲23.7745.71 ▲8.62
Add New Post /wp-admin/post-new.php1,857 ▲33121.54 ▼1.57614.20 ▼8.5935.76 ▼25.11
Media Library /wp-admin/upload.php1,553 ▲1534.43 ▲0.3293.33 ▼3.5751.15 ▲9.30
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,3073.3243.4826.86
/wp-admin/index.php?page=tc-installation-wizard2251.5817.4445.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/tickera-event-ticketing-system/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 13 options
    • tc_version
    • fs_accounts
    • widget_tc_cart_widget
    • fs_debug_mode
    • fs_active_plugins
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_tc_upcoming_events_widget
    • tc_settings
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/tickera-event-ticketing-system/includes/templates/page-ipn.php
  • 81× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/tickera-event-ticketing-system/includes/classes/class.beaver_shortcodes.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'TC_Ticket_Template_Elements' not found in wp-content/plugins/tickera-event-ticketing-system/includes/ticket-elements-new/event_logo_element.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'TC_Ticket_Template_Elements' not found in wp-content/plugins/tickera-event-ticketing-system/includes/ticket-elements/ticket_buyer_name_element.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'TC_Gateway_API' not found in wp-content/plugins/tickera-event-ticketing-system/includes/gateways/custom-offline-payments.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tickera-event-ticketing-system/includes/admin-pages/settings-email.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'TC_API_Keys' not found in wp-content/plugins/tickera-event-ticketing-system/includes/admin-pages/settings-api.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/tickera-event-ticketing-system/includes/templates/page-payment.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/tickera-event-ticketing-system/includes/admin-pages/installation-wizard/finish.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'TC_Ticket_Template_Elements' not found in wp-content/plugins/tickera-event-ticketing-system/includes/ticket-elements/ticket_qr_code_element.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function start() on null in wp-content/plugins/tickera-event-ticketing-system/includes/admin-pages/settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 18 tag instead of maximum 10
The official readme.txt might help

tickera-event-ticketing-system/tickera.php 85% from 13 tests

The entry point to "Tickera - WordPress Event Ticketing" version 3.5.2.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("tickera-event-ticketing-system.php" instead of "tickera.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected151,079 lines of code in 509 files:
LanguageFilesBlank linesComment linesLines of code
PHP38215,01733,367108,385
JavaScript493,8911,49718,388
PO File105,5506,66712,010
CSS622,17451311,512
SVG601784

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 4,371)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 502)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity89.90
▷ Minimum class complexity1.00
▷ Maximum class complexity4,371.00
Average method complexity5.98
▷ Minimum method complexity1.00
▷ Maximum method complexity502.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes156
▷ Abstract classes21.28%
▷ Concrete classes15498.72%
▷ Final classes00.00%
Methods2,824
▷ Static methods34512.22%
▷ Public methods2,15876.42%
▷ Protected methods29310.38%
▷ Private methods37313.21%
Functions317
▷ Named functions31198.11%
▷ Anonymous functions61.89%
Constants286
▷ Global constants23983.57%
▷ Class constants4716.43%
▷ Public constants47100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
79 PNG files occupy 0.55MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/gateways/payulatam.png5.53KB2.61KB▼ 52.84%
images/gateways/payumoney.png4.87KB2.51KB▼ 48.53%
css/chosen-sprite.png0.53KB0.88KB0.00%
images/gateways/small-stripe.png5.84KB3.65KB▼ 37.58%
freemius/assets/img/pushover.png10.70KB3.15KB▼ 70.57%