10% ltd-tickets

Code Review | London Theatre Direct

WordPress plugin London Theatre Direct scored10%from 54 tests.

About plugin

  • Plugin page: ltd-tickets
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-4.8
  • WordPress version: 6.3.1
  • First release: Jul 25, 2017
  • Latest release: Sep 27, 2017
  • Number of updates: 25
  • Update frequency: every 2.8 days
  • Top authors: ukdesignservices (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,167 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/ltd-tickets/includes/class-ltd-tickets-integration.php+32
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲1.08MB] [CPU: ▲5.96ms] 75% from 4 tests

Server-side resources used by London Theatre Direct
Please have a look at the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,046.25ms on /wp-admin/admin.php?page=ltd-tickets-log)
PageMemory (MB)CPU Time (ms)
Home /4.54 ▲1.0749.67 ▲6.25
Dashboard /wp-admin4.37 ▲1.0750.46 ▲1.70
Posts /wp-admin/edit.php4.49 ▲1.1354.96 ▲6.28
Add New Post /wp-admin/post-new.php7.10 ▲1.21100.06 ▲15.01
Media Library /wp-admin/upload.php4.29 ▲1.0642.07 ▲9.60
Theatre Tickets /wp-admin/admin.php?page=ltd-tickets4.5936.63
Add New /wp-admin/post-new.php?post_type=ukds-products7.0984.10
All Products /wp-admin/edit.php?post_type=ukds-products4.3445.07
Log /wp-admin/admin.php?page=ltd-tickets-log4.291,046.25
Add New /wp-admin/post-new.php?post_type=ukds-venues7.10112.41
Product Categories /wp-admin/edit-tags.php?taxonomy=ukds-product-category&post_type=ukds-products4.2941.88
All Venues /wp-admin/edit.php?post_type=ukds-venues4.3445.36
Shortcode Builder /wp-admin/admin.php?page=ltd-tickets-shortcodes4.2736.42
Data Manager /wp-admin/admin.php?page=ltd-tickets-synchonisation4.3940.92

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 81 new files
Database: 1 new table, 9 new options
New tables
wp_ltd_log
New WordPress options
ltd-tickets
widget_recent-posts
widget_ltd_tickets_product_category_widget
widget_theysaidso_widget
ukds-product-category_children
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for London Theatre Direct
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,107 ▲36114.57 ▼0.0316.76 ▲14.8538.98 ▼5.39
Dashboard /wp-admin2,357 ▲1665.27 ▲0.38109.42 ▼6.9139.53 ▼4.02
Posts /wp-admin/edit.php2,224 ▲1352.59 ▲0.5843.99 ▲4.1839.72 ▲4.93
Add New Post /wp-admin/post-new.php1,633 ▲11923.32 ▲5.81612.77 ▼67.7333.89 ▼20.50
Media Library /wp-admin/upload.php1,543 ▲1554.53 ▲0.3192.47 ▼9.3541.91 ▼0.98
Theatre Tickets /wp-admin/admin.php?page=ltd-tickets3,0112.9878.0934.02
Add New /wp-admin/post-new.php?post_type=ukds-products6,50619.41909.6936.27
All Products /wp-admin/edit.php?post_type=ukds-products1,2102.3336.4933.66
Log /wp-admin/admin.php?page=ltd-tickets-log1,1892.1231.8029.01
Add New /wp-admin/post-new.php?post_type=ukds-venues6,33624.93759.4229.08
Product Categories /wp-admin/edit-tags.php?taxonomy=ukds-product-category&post_type=ukds-products1,4152.1930.1927.80
All Venues /wp-admin/edit.php?post_type=ukds-venues1,1942.3535.5429.26
Shortcode Builder /wp-admin/admin.php?page=ltd-tickets-shortcodes1,2352.1434.4629.97
Data Manager /wp-admin/admin.php?page=ltd-tickets-synchonisation1,7142.2333.2634.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_ltd_log
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_recent-comments
    • theysaidso_admin_options
    • ltd-tickets
    • db_upgraded
    • widget_recent-posts
    • ukds-product-category_children
    • widget_ltd_tickets_product_category_widget
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ltd-tickets/public/partials/ltd-tickets-public-display.php
  • 26× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/ltd-tickets/templates/parts/ukds-venue-product-item.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ltd-tickets/includes/class-ltd-tickets-cron-updater.php:22
    • > PHP Warning
      Use of undefined constant LTD_PLUGIN_VERSION - assumed 'LTD_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/ltd-tickets/includes/class-ltd-tickets-cron-updater.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/ltd-tickets/templates/parts/ukds-archive-header.php:4
    • > PHP Fatal error
      Trait 'LTD_Tickets_Logging' not found in wp-content/plugins/ltd-tickets/includes/class-ltd-tickets-shortcodes.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ltd-tickets/admin/partials/ltd-tickets-shortcodes-display.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ltd-tickets/admin/partials/ltd-tickets-synchronisation-display.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/ltd-tickets/templates/archive-ukds-products.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/ltd-tickets/templates/parts/ukds-archive-item.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ltd-tickets/admin/partials/ltd-tickets-admin-display.php:16

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add descriptions for these screenshots #1, #10, #11, #2, #3, #4, #5, #6, #7, #8, #9 in ltd-tickets/assets to your readme.txt
You can take inspiration from this readme.txt

ltd-tickets/ltd-tickets.php 92% from 13 tests

The primary PHP file in "London Theatre Direct" version 1.0.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 185 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin10,619 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
PHP461,1211,0525,513
SVG1002,671
CSS7263211,244
JavaScript6119571,029
PO File26680162

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity26.83
▷ Minimum class complexity1.00
▷ Maximum class complexity189.00
Average method complexity4.37
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes23
▷ Abstract classes28.70%
▷ Concrete classes2191.30%
▷ Final classes00.00%
Methods186
▷ Static methods105.38%
▷ Public methods15784.41%
▷ Protected methods2010.75%
▷ Private methods94.84%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/ltd-logo.png5.69KB2.92KB▼ 48.73%
admin/images/wide-layout.png1.30KB0.29KB▼ 78.13%
admin/images/awin.png7.42KB3.29KB▼ 55.72%
templates/images/missing-image.png11.23KB4.78KB▼ 57.49%
admin/images/boxed-layout.png1.41KB0.42KB▼ 69.97%