72% getyourguide-ticketing

Code Review | GetYourGuide Ticketing

WordPress plugin GetYourGuide Ticketing scored72%from 54 tests.

About plugin

  • Plugin page: getyourguide-tick...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 15, 2022
  • Latest release: Nov 28, 2022
  • Number of updates: 16
  • Update frequency: every 4.6 days
  • Top authors: marcelloromanelligyg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /566 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.25ms] Passed 4 tests

This is a short check of server-side resources used by GetYourGuide Ticketing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0645.08 ▲7.09
Dashboard /wp-admin3.37 ▲0.0746.01 ▼1.35
Posts /wp-admin/edit.php3.48 ▲0.1348.44 ▲0.62
Add New Post /wp-admin/post-new.php5.97 ▲0.0887.25 ▼6.97
Media Library /wp-admin/upload.php3.29 ▲0.0636.07 ▲2.72
Link Builder /wp-admin/admin.php?page=getyourguide-ticketing-link3.2629.80
Settings /wp-admin/admin.php?page=getyourguide-ticketing-settings3.2530.97

Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for GetYourGuide Ticketing
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14114.17 ▼0.6277.67 ▲75.9844.37 ▲5.51
Dashboard /wp-admin2,237 ▲495.87 ▼0.02115.27 ▲13.2638.29 ▼4.25
Posts /wp-admin/edit.php2,120 ▲282.01 ▼0.0237.88 ▼11.4838.33 ▼4.09
Add New Post /wp-admin/post-new.php1,540 ▲2617.66 ▼0.05689.30 ▲78.1958.80 ▲10.94
Media Library /wp-admin/upload.php1,419 ▲314.21 ▼0.0594.03 ▼6.5442.76 ▼0.45
Link Builder /wp-admin/admin.php?page=getyourguide-ticketing-link8802.0622.8026.43
Settings /wp-admin/admin.php?page=getyourguide-ticketing-settings1,0332.0524.3233.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% 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)
These errors were triggered by the plugin
  • 41 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=getyourguide-ticketing-settings
    • > Notice in wp-content/plugins/getyourguide-ticketing/admin/partials/fields/currency.php+117
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/getyourguide-ticketing/public/partials/getyourguide-ticketing-public-display.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/getyourguide-ticketing/admin/partials/fields/partner-hash.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/getyourguide-ticketing/admin/partials/getyourguide-ticketing-link-builder.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/getyourguide-ticketing/admin/partials/getyourguide-ticketing-admin-display.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function selected() in wp-content/plugins/getyourguide-ticketing/admin/partials/fields/currency.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: booking engine, ticket, museum, getyourguide, ticketing

getyourguide-ticketing/getyourguide-ticketing.php 92% from 13 tests

The principal PHP file in "GetYourGuide Ticketing" v. 1.0.6 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 156 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected497 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP15124536431
JavaScript115066
CSS2080

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity1.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin