84% ticket-buttons-for-the-events-calendar

Code Review | Ticket buttons for The Events Calendar

WordPress plugin Ticket buttons for The Events Calendar scored84%from 54 tests.

About plugin

  • Plugin page: ticket-buttons-fo...
  • Plugin version: 1.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Nov 9, 2022
  • Latest release: Feb 1, 2023
  • Number of updates: 15
  • Update frequency: every 5.7 days
  • Top authors: slimndap (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /210 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Ticket buttons for The Events Calendar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.34 ▼1.49
Dashboard /wp-admin3.36 ▲0.0647.11 ▼1.16
Posts /wp-admin/edit.php3.48 ▲0.1246.02 ▲0.03
Add New Post /wp-admin/post-new.php5.96 ▲0.0886.18 ▼11.29
Media Library /wp-admin/upload.php3.29 ▲0.0635.71 ▼0.97

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Ticket buttons for The Events Calendar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8514.74 ▲0.361.73 ▲0.2040.65 ▼0.28
Dashboard /wp-admin2,207 ▲214.90 ▼0.03108.55 ▼1.0738.27 ▼2.83
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0035.42 ▼1.0733.63 ▼1.97
Add New Post /wp-admin/post-new.php1,522 ▲523.29 ▲5.73665.84 ▼9.8751.60 ▲1.20
Media Library /wp-admin/upload.php1,392 ▲14.30 ▲0.0595.13 ▼8.6041.82 ▼4.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant PLUGIN_PATH - assumed 'PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ticket-buttons-for-the-events-calendar/includes/TBTEC.php on line 4
    • > PHP Warning
      include_once(): Failed opening 'PLUGIN_PATHincludes/Admin/Admin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/ticket-buttons-for-the-events-calendar/includes/TBTEC.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TBTEC\\register_post_meta() in wp-content/plugins/ticket-buttons-for-the-events-calendar/includes/TBTEC.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TBTEC\\Admin\\add_action() in wp-content/plugins/ticket-buttons-for-the-events-calendar/includes/Admin/Admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TBTEC\\Frontend\\add_action() in wp-content/plugins/ticket-buttons-for-the-events-calendar/includes/Frontend/Frontend.php:4
    • > PHP Warning
      include_once(PLUGIN_PATHincludes/Admin/Admin.php): failed to open stream: No such file or directory in wp-content/plugins/ticket-buttons-for-the-events-calendar/includes/TBTEC.php on line 4
    • > PHP Warning
      Use of undefined constant PLUGIN_PATH - assumed 'PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ticket-buttons-for-the-events-calendar/includes/TBTEC.php on line 5
    • > PHP Warning
      include_once(PLUGIN_PATHincludes/Frontend/Frontend.php): failed to open stream: No such file or directory in wp-content/plugins/ticket-buttons-for-the-events-calendar/includes/TBTEC.php on line 5
    • > PHP Warning
      include_once(): Failed opening 'PLUGIN_PATHincludes/Frontend/Frontend.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/ticket-buttons-for-the-events-calendar/includes/TBTEC.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were 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
4 plugin tags: button, calendar, tickets, events

ticket-buttons-for-the-events-calendar/ticket-buttons-for-the-events-calendar.php 92% from 13 tests

The entry point to "Ticket buttons for The Events Calendar" version 1.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected409 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP411332331
CSS20276
JavaScript2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin