84% my-tickets

Code Review | My Tickets

WordPress plugin My Tickets scored84%from 54 tests.

About plugin

  • Plugin page: my-tickets
  • Plugin version: 1.11.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Jan 31, 2015
  • Latest release: Jul 22, 2023
  • Number of updates: 278
  • Update frequency: every 11.1 days
  • Top authors: joedolson (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

1,000+ active /115,422 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲2.06MB] [CPU: ▲10.16ms] Passed 4 tests

An overview of server-side resources used by My Tickets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.51 ▲2.0549.42 ▲9.94
Dashboard /wp-admin5.37 ▲2.0757.85 ▲12.04
Posts /wp-admin/edit.php5.49 ▲2.1358.55 ▲14.69
Add New Post /wp-admin/post-new.php7.96 ▲2.0798.06 ▲3.98
Media Library /wp-admin/upload.php5.29 ▲2.0654.90 ▲22.36
Ticketing Help /wp-admin/admin.php?page=mt-help5.2447.79
Ticket Settings /wp-admin/admin.php?page=mt-ticketing5.2544.28
Payment Settings /wp-admin/admin.php?page=mt-payment5.2645.58
Settings /wp-admin/admin.php?page=my-tickets5.2452.50

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 151 new files
Database: no new tables, 10 new options
New WordPress options
mt_labels
widget_recent-posts
widget_recent-comments
widget_mt_short_cart_widget
mt_version
can_compress_scripts
db_upgraded
mt_settings
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for My Tickets
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,006 ▲24513.45 ▼0.928.67 ▲7.0139.20 ▲0.11
Dashboard /wp-admin2,283 ▲1065.57 ▼0.0382.95 ▼7.2175.02 ▲35.78
Posts /wp-admin/edit.php2,188 ▲881.98 ▼0.0535.18 ▲1.5734.07 ▼4.64
Add New Post /wp-admin/post-new.php1,613 ▲8523.06 ▼0.04692.12 ▲2.4366.42 ▲6.26
Media Library /wp-admin/upload.php1,488 ▲854.12 ▼0.0593.70 ▼7.5777.30 ▲33.49
Ticketing Help /wp-admin/admin.php?page=mt-help1,5403.2774.5047.96
Ticket Settings /wp-admin/admin.php?page=mt-ticketing1,9013.4469.2433.78
Payment Settings /wp-admin/admin.php?page=mt-payment1,7423.9083.6544.31
Settings /wp-admin/admin.php?page=my-tickets1,7843.3969.6950.55

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 WordPress options detected upon uninstall: 9 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_mt_short_cart_widget
    • widget_theysaidso_widget
    • mt_version
    • mt_labels
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 77× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'chillerlan\\QRCode\\Output\\QROutputAbstract' not found in wp-content/plugins/my-tickets/vendor/chillerlan/php-qrcode/src/Output/QRFpdf.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/my-tickets/vendor/chillerlan/php-settings-container/tests/ContainerTest.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'chillerlan\\QRCodeTest\\Output\\QROutputTestAbstract' not found in wp-content/plugins/my-tickets/vendor/chillerlan/php-qrcode/tests/Output/QRMarkupTest.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/my-tickets/templates/tickets.php:14
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/my-tickets/vendor/chillerlan/php-settings-container/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/my-tickets/vendor/chillerlan/php-settings-container/examples/simple.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'chillerlan\\QRCodeTest\\Data\\DatainterfaceTestAbstract' not found in wp-content/plugins/my-tickets/vendor/chillerlan/php-qrcode/tests/Data/AlphaNumTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'chillerlan\\QRCode\\Data\\QRDataAbstract' not found in wp-content/plugins/my-tickets/vendor/chillerlan/php-qrcode/src/Data/Byte.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'chillerlan\\QRCodeTest\\QRTestAbstract' not found in wp-content/plugins/my-tickets/vendor/chillerlan/php-qrcode/tests/Data/QRMatrixTest.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'chillerlan\\QRCode\\QRCodeException' not found in wp-content/plugins/my-tickets/vendor/chillerlan/php-qrcode/src/Data/QRCodeDataException.php:17
    • > PHP Warning
      require_once(wp-content/plugins/my-tickets/vendor/chillerlan/php-qrcode/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/my-tickets/vendor/chillerlan/php-qrcode/examples/imageWithLogo.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: box office, sell tickets, tickets, event registration, ticket sales...

my-tickets/my-tickets.php 85% from 13 tests

The main file in "My Tickets" v. 1.11.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("lang")
  • Domain Path: Prefix the domain path with a forward slash character ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin16,866 lines of code in 132 files:
LanguageFilesBlank linesComment linesLines of code
PHP1002,2365,32313,552
JavaScript991211,243
CSS722671,043
Markdown2970457
JSON300210
HTML1260137
XML500129
YAML527395

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity8.33
▷ Minimum class complexity1.00
▷ Maximum class complexity77.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces14
Interfaces3
Traits4
Classes51
▷ Abstract classes611.76%
▷ Concrete classes4588.24%
▷ Final classes00.00%
Methods263
▷ Static methods31.14%
▷ Public methods19373.38%
▷ Protected methods6725.48%
▷ Private methods31.14%
Functions314
▷ Named functions30396.50%
▷ Anonymous functions113.50%
Constants50
▷ Global constants12.00%
▷ Class constants4998.00%
▷ Public constants4489.80%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/tickets.png0.76KB0.80KB0.00%
vendor/chillerlan/php-qrcode/examples/octocat.png2.41KB2.46KB0.00%
vendor/chillerlan/php-qrcode/examples/example_svg.png15.55KB6.70KB▼ 56.90%
vendor/chillerlan/php-qrcode/examples/example_image.png2.23KB1.09KB▼ 50.94%
images/logo.png23.41KB8.68KB▼ 62.94%