71% ticketack

Code Review | Ticketack

WordPress plugin Ticketack scored71%from 54 tests.

About plugin

  • Plugin page: ticketack
  • Plugin version: 2.66.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 1, 2019
  • Latest release: Nov 23, 2023
  • Number of updates: 372
  • Update frequency: every 4.6 days
  • Top authors: netoxygen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /6,990 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.68MB] [CPU: ▲3.65ms] 75% from 4 tests

Analyzing server-side resources used by Ticketack
Please have a look at the following items
  • RAM: Try to keep total memory usage under 10MB (currently 11.64MB on /wp-admin/options-general.php?page=ticketack-admin)
PageMemory (MB)CPU Time (ms)
Home /5.81 ▲2.3550.17 ▲8.95
Dashboard /wp-admin5.71 ▲2.3679.26 ▲16.56
Posts /wp-admin/edit.php5.76 ▲2.4072.07 ▲23.76
Add New Post /wp-admin/post-new.php5.52 ▼0.3853.42 ▼32.98
Media Library /wp-admin/upload.php5.63 ▲2.4056.34 ▲22.08
Add New /wp-admin/post-new.php?post_type=tkt-article5.8673.57
Add New /wp-admin/post-new.php?post_type=tkt-event5.8680.37
All Ticketack events /wp-admin/edit.php?post_type=tkt-event5.6862.13
Ticketack /wp-admin/options-general.php?page=ticketack-admin11.64104.96
All Ticketack people /wp-admin/edit.php?post_type=tkt-person5.6856.42
All Ticketack articles /wp-admin/edit.php?post_type=tkt-article5.6855.46
Add New /wp-admin/post-new.php?post_type=tkt-person5.8670.02

Server storage [IO: ▲5.14MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • Illegal file modification detected: 1 file (67.29KB) outside of "wp-content/plugins/ticketack/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/tkt_override.css
Filesystem: 455 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ticketack
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,029 ▲25713.38 ▼1.358.06 ▲6.0640.82 ▼3.05
Dashboard /wp-admin2,309 ▲1295.67 ▲0.05107.77 ▲9.7949.95 ▲4.73
Posts /wp-admin/edit.php2,231 ▲1312.04 ▲0.0841.56 ▲4.2736.53 ▲0.37
Add New Post /wp-admin/post-new.php1,619 ▲9323.38 ▲0.26602.90 ▲4.7451.48 ▼20.51
Media Library /wp-admin/upload.php1,517 ▲1144.31 ▲0.2494.83 ▼7.5144.97 ▲3.20
Add New /wp-admin/post-new.php?post_type=tkt-article2,4807.58188.1975.33
Add New /wp-admin/post-new.php?post_type=tkt-event2,4747.72168.4858.14
All Ticketack events /wp-admin/edit.php?post_type=tkt-event1,2102.0036.3134.82
Ticketack /wp-admin/options-general.php?page=ticketack-admin9902.0125.1532.51
All Ticketack people /wp-admin/edit.php?post_type=tkt-person1,1912.0437.3932.59
All Ticketack articles /wp-admin/edit.php?post_type=tkt-article1,1952.0537.9732.36
Add New /wp-admin/post-new.php?post_type=tkt-person2,4747.52182.0767.06

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ticketack-admin
    • > Notice in wp-content/plugins/ticketack/vendor/scssphp/scssphp/src/Compiler.php+5013
    Trying to access array offset on value of type null

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
  • 12× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/ticketack/app/templates/filters/filter.tpl.php
    • > /wp-content/plugins/ticketack/app/templates/program/grid/screenings.tpl.php
    • > /wp-content/plugins/ticketack/app/templates/filters/days_filter.tpl.php
    • > /wp-content/plugins/ticketack/app/templates/program/filter.tpl.php
    • > /wp-content/plugins/ticketack/app/templates/filters/filter_rows.tpl.php
    • > /wp-content/plugins/ticketack/app/templates/booking/screenings_list_dates.tpl.php
    • > /wp-content/plugins/ticketack/app/templates/user/account/menu.tpl.php
    • > /wp-content/plugins/ticketack/app/templates/cart/cart_icon.tpl.php
    • > /wp-content/plugins/ticketack/app/templates/pantaflix/iframe.tpl.php
    • > /wp-content/plugins/ticketack/app/templates/booking_wizard/wizard_navigation.tpl.php
  • 398× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_title() in wp-content/plugins/ticketack/app/templates/people/person.tpl.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Ticketack\\WP\\TKTApp' not found in wp-content/plugins/ticketack/app/templates/buy_pass/buy.tpl.php:21
    • > PHP Warning
      implode(): Invalid arguments passed in wp-content/plugins/ticketack/app/templates/booking/screenings_list.tpl.php on line 23
    • > PHP Fatal error
      Uncaught Error: Class 'Ticketack\\WP\\Shortcodes\\TKTShortcode' not found in wp-content/plugins/ticketack/app/shortcodes/user_account.class.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tkt_t() in wp-content/plugins/ticketack/app/templates/booking/screenings_list_pricings.tpl.php:15
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/ticketack/app/templates/event/event.tpl.php on line 15
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/ticketack/app/templates/article/slider/articles.tpl.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to a member function getTimestamp() on null in wp-content/plugins/ticketack/app/templates/signage/door.tpl.php:203
    • > PHP Notice
      Trying to get property 'tabs' of non-object in wp-content/plugins/ticketack/app/templates/user/account/menu.tpl.php on line 20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/ticketack/vendor/guzzlehttp/psr7/src/CachingStream.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Contributors: Plugin contributors not specified
The official readme.txt might help

ticketack/wpticketack.php 85% from 13 tests

The entry point to "Ticketack" version 2.66.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("ticketack.php" instead of "wpticketack.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
Everything looks great! No dangerous files found in this plugin58,295 lines of code in 405 files:
LanguageFilesBlank linesComment linesLines of code
PHP3356,94012,56533,299
CSS284167,380
PO File52,032654,380
Sass248103,767
Markdown161,03803,289
YAML22133893,175
JavaScript53521,1972,103
JSON1000802
XML37066
SVG40025
make1409

PHP code 0% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,214)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 195)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity20.13
▷ Minimum class complexity1.00
▷ Maximum class complexity1,214.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity195.00
Code structure
Namespaces28
Interfaces17
Traits2
Classes201
▷ Abstract classes62.99%
▷ Concrete classes19597.01%
▷ Final classes94.62%
Methods1,766
▷ Static methods21412.12%
▷ Public methods1,28672.82%
▷ Protected methods33118.74%
▷ Private methods1498.44%
Functions336
▷ Named functions12236.31%
▷ Anonymous functions21463.69%
Constants280
▷ Global constants279.64%
▷ Class constants25390.36%
▷ Public constants253100.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
20 compressed PNG files occupy 0.16MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
front/build/images/admin/screen-shop.png53.33KB56.99KB0.00%
front/build/images/slider/hover/right.png0.22KB0.25KB0.00%
front/build/images/articles/left_arrow.png0.64KB0.79KB0.00%
front/build/images/slider/right.png0.22KB0.25KB0.00%
front/build/images/admin/screen-program1.png20.20KB21.32KB0.00%