10% event-tickets-with-ticket-scanner

Code Review | Event Tickets with Ticket Scanner

WordPress plugin Event Tickets with Ticket Scanner scored10%from 54 tests.

About plugin

  • Plugin page: event-tickets-wit...
  • Plugin version: 2.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 5, 2022
  • Latest release: Nov 28, 2023
  • Number of updates: 97
  • Update frequency: every 5.0 days
  • Top authors: sasonikolov (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

800+ active /20,412 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/event-tickets-with-ticket-scanner/init_file.php+11
    date_default_timezone_set(): Timezone ID '+00:00' is invalid

Server metrics [RAM: ▼1.96MB] [CPU: ▼48.48ms] Passed 4 tests

An overview of server-side resources used by Event Tickets with Ticket Scanner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.28 ▼31.71
Dashboard /wp-admin2.05 ▼1.265.73 ▼44.95
Posts /wp-admin/edit.php2.05 ▼1.315.18 ▼41.08
Add New Post /wp-admin/post-new.php2.05 ▼3.845.98 ▼76.16
Media Library /wp-admin/upload.php2.05 ▼1.187.68 ▼22.98
Event Tickets /wp-admin/options-general.php?page=event-tickets-with-ticket-scanner2.056.26

Server storage [IO: ▲31.55MB] [DB: ▲0.08MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • Filesystem usage must be lower than 25MB (currently using 31.55MB)
Filesystem: 1,125 new files
Database: 5 new tables, 8 new options
New tables
wp_saso_eventtickets_authtokens
wp_saso_eventtickets_ips
wp_saso_eventtickets_errorlogs
wp_saso_eventtickets_lists
wp_saso_eventtickets_codes
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
SASO_EVENTTICKETS_PLUGIN_VERSION
can_compress_scripts
db_upgraded
saso_eventtickets_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for Event Tickets with Ticket Scanner
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4714.24 ▼0.101.84 ▲0.0745.58 ▲1.45
Dashboard /wp-admin2,202 ▲245.56 ▼0.0190.77 ▼22.6162.99 ▲17.29
Posts /wp-admin/edit.php2,101 ▲11.97 ▲0.0338.04 ▼4.3032.98 ▼3.96
Add New Post /wp-admin/post-new.php1,436 ▼9018.10 ▼4.89692.06 ▲89.9352.21 ▼2.49
Media Library /wp-admin/upload.php1,416 ▲164.13 ▼0.08140.83 ▲44.5954.08 ▲11.06
Event Tickets /wp-admin/options-general.php?page=event-tickets-with-ticket-scanner1,9135.02116.5253.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/event-tickets-with-ticket-scanner/init_file.php+11
    date_default_timezone_set(): Timezone ID '+00:00' is invalid
  • This plugin does not fully uninstall, leaving 5 tables in the database
    • wp_saso_eventtickets_lists
    • wp_saso_eventtickets_errorlogs
    • wp_saso_eventtickets_codes
    • wp_saso_eventtickets_authtokens
    • wp_saso_eventtickets_ips
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_recent-posts
    • SASO_EVENTTICKETS_PLUGIN_VERSION
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • saso_eventtickets_db_version
    • can_compress_scripts
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=event-tickets-with-ticket-scanner
    • > POST request to /wp-admin/admin-ajax.php?action=sasoEventtickets_executeAdminSettings&a_sngmbh=getCodes&nonce=ad5404c394
    • > Notice in wp-content/plugins/event-tickets-with-ticket-scanner/init_file.php+11
    date_default_timezone_set(): Timezone ID '+00:00' is invalid

SRP 0% 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
Please fix the following
  • 15× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/event-tickets-with-ticket-scanner/vendors/fpdf185/tutorial/tuto2.php
    • > /wp-content/plugins/event-tickets-with-ticket-scanner/vendors/fpdf185/tutorial/tuto6.php
    • > /wp-content/plugins/event-tickets-with-ticket-scanner/vendors/fpdf185/tutorial/tuto7.php
    • > /wp-content/plugins/event-tickets-with-ticket-scanner/ticket/scanner_old/index_old.php
    • > /wp-content/plugins/event-tickets-with-ticket-scanner/vendors/fpdf185/tutorial/tuto4.php
    • > /wp-content/plugins/event-tickets-with-ticket-scanner/init_file.php
    • > /wp-content/plugins/event-tickets-with-ticket-scanner/vendors/fpdf185/tutorial/tuto5.php
    • > /wp-content/plugins/event-tickets-with-ticket-scanner/vendors/fpdf185/tutorial/tuto1.php
    • > /wp-content/plugins/event-tickets-with-ticket-scanner/vendors/fpdf185/tutorial/tuto3.php
    • > /wp-content/plugins/event-tickets-with-ticket-scanner/ticket/index.php
  • 189× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Unary\\AbstractUnary' not found in wp-content/plugins/event-tickets-with-ticket-scanner/vendors/twig/twig/twig/src/Node/Expression/Unary/NotUnary.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\IncludeNode' not found in wp-content/plugins/event-tickets-with-ticket-scanner/vendors/twig/twig/twig/src/Node/EmbedNode.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/event-tickets-with-ticket-scanner/vendors/twig/twig/twig/src/TokenParser/WithTokenParser.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig\\Sandbox\\SecurityPolicyInterface' not found in wp-content/plugins/event-tickets-with-ticket-scanner/vendors/twig/twig/twig/src/Sandbox/SecurityPolicy.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/event-tickets-with-ticket-scanner/vendors/twig/twig/twig/src/Node/ModuleNode.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/event-tickets-with-ticket-scanner/vendors/twig/twig/twig/src/Node/Expression/TempNameExpression.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/event-tickets-with-ticket-scanner/vendors/twig/twig/twig/src/Node/DoNode.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/event-tickets-with-ticket-scanner/vendors/twig/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/event-tickets-with-ticket-scanner/vendors/twig/twig/twig/src/Extension/StagingExtension.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/event-tickets-with-ticket-scanner/vendors/twig/twig/twig/src/Node/DeprecatedNode.php:23

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=event-tickets-with-ticket-scanner
    • > Console-api (severe) in wp-includes/js/dist/i18n.min.js?ver=7701b0c3857f914212ef+1:4962
    sprintf error: \n\nTypeError: [sprintf] expecting number but found undefined

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
6 plugin tags: party tickets, ticket scanner, event ticketing, redeem tickets, woocommerce...

event-tickets-with-ticket-scanner/index.php 85% from 13 tests

The entry point to "Event Tickets with Ticket Scanner" version 2.1.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("event-tickets-with-ticket-scanner.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 306 characters long)

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
It is important to fix the following items
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/event-tickets-with-ticket-scanner/vendors/phpqrcode/tools/merge.bat
102,902 lines of code in 518 files:
LanguageFilesBlank linesComment linesLines of code
PHP4037,64421,45284,078
JavaScript222,4347,31211,821
HTML597203,257
CSS1636801,756
PO File15767101,309
JSON900479
Markdown5570188
reStructuredText18510
Bourne Shell1002
DOS Batch1002

PHP code 0% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 4,413)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 502)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity40.21
▷ Minimum class complexity1.00
▷ Maximum class complexity4,413.00
Average method complexity5.32
▷ Minimum method complexity1.00
▷ Maximum method complexity502.00
Code structure
Namespaces35
Interfaces13
Traits2
Classes285
▷ Abstract classes134.56%
▷ Concrete classes27295.44%
▷ Final classes5821.32%
Methods2,761
▷ Static methods37313.51%
▷ Public methods2,04974.21%
▷ Protected methods50218.18%
▷ Private methods2107.61%
Functions208
▷ Named functions17282.69%
▷ Anonymous functions3617.31%
Constants333
▷ Global constants24573.57%
▷ Class constants8826.43%
▷ Public constants8798.86%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
61 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/button_cancel.png7.70KB5.42KB▼ 29.54%
3rd/DataTables-1.10.21/images/sort_both.png0.20KB0.29KB0.00%
vendors/phpqrcode/cache/frame_12.png0.21KB0.20KB▼ 4.63%
img/details_open.png0.69KB0.80KB0.00%
vendors/phpqrcode/temp/test32a08dfc245c897df2ffa1bc6888346e.png0.34KB0.33KB▼ 5.40%