67% the-events-calendar

Code Review | The Events Calendar

WordPress plugin The Events Calendar scored67%from 54 tests.

About plugin

  • Plugin page: the-events-calendar
  • Plugin version: 6.2.8.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 19, 2010
  • Latest release: Nov 20, 2023
  • Number of updates: 1,213
  • Update frequency: every 4.2 days
  • Top authors: bordoni (29.35%)barry.hughes (9.89%)justinendler (9.15%)ModernTribe (7.67%)zbtirrell (7.34%)

Code review

54 tests

User reviews

2158 reviews

Install metrics

700,000+ active /52,132,260 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲16.62MB] [CPU: ▲161.83ms] 25% from 4 tests

Server-side resources used by The Events Calendar
Please have a look at the following items
  • RAM: Total memory usage must be kept under 10MB (currently 19.96MB on /wp-admin/post-new.php?post_type=tribe_venue)
  • CPU: Total CPU usage should be kept under 500.00ms (currently 10,215.91ms on /wp-admin/edit.php?post_type=tribe_events&page=aggregator)
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 16.62MB on /wp-admin/post-new.php?post_type=tribe_venue)
PageMemory (MB)CPU Time (ms)
Home /19.49 ▲16.03180.72 ▲139.83
Dashboard /wp-admin20.91 ▲17.57771.47 ▲706.76
Posts /wp-admin/edit.php19.86 ▲16.50224.07 ▲180.78
Add New Post /wp-admin/post-new.php23.75 ▲17.87246.77 ▲151.14
Media Library /wp-admin/upload.php19.62 ▲16.39209.21 ▲175.57
Venues /wp-admin/edit.php?post_type=tribe_venue19.74181.21
Help /wp-admin/edit.php?post_type=tribe_events&page=tec-events-help19.69181.79
Scheduled Actions /wp-admin/tools.php?page=action-scheduler19.78190.39
Event Add-Ons /wp-admin/admin.php?page=tribe-app-shop19.67181.81
Add New /wp-admin/post-new.php?post_type=tribe_events20.57250.29
Troubleshooting /wp-admin/edit.php?post_type=tribe_events&page=tec-troubleshooting19.74188.42
Import /wp-admin/edit.php?post_type=tribe_events&page=aggregator20.1010,215.91
Event Add-Ons /wp-admin/edit.php?post_type=tribe_events&page=tribe-app-shop19.69171.86
Organizers /wp-admin/edit.php?post_type=tribe_organizer19.73176.34
Add New Venue /wp-admin/post-new.php?post_type=tribe_venue19.96201.49

Server storage [IO: ▲24.77MB] [DB: ▲0.11MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2,167 new files
Database: 6 new tables, 25 new options
New tables
wp_actionscheduler_actions
wp_tec_occurrences
wp_actionscheduler_claims
wp_actionscheduler_logs
wp_tec_events
wp_actionscheduler_groups
New WordPress options
tribe_events_calendar_options
tribe_last_updated_option
tec_ct1_occurrences_table_schema_version
can_compress_scripts
tec_ct1_events_table_schema_version
db_upgraded
widget_theysaidso_widget
tribe_pue_key_notices
action_scheduler_hybrid_store_demarkation
stellarwp_telemetry_the-events-calendar_show_optin
...

Browser metrics Passed 4 tests

Checking browser requirements for The Events Calendar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,117 ▼64512.61 ▼1.732.34 ▲0.7443.31 ▲0.61
Dashboard /wp-admin2,471 ▲2945.73 ▲0.1599.44 ▲7.35109.91 ▲68.51
Posts /wp-admin/edit.php2,320 ▲2202.33 ▲0.3138.74 ▲2.1931.97 ▼6.41
Add New Post /wp-admin/post-new.php1,862 ▲32725.28 ▲0.03703.17 ▲97.2238.50 ▼28.98
Media Library /wp-admin/upload.php1,691 ▲2974.27 ▲0.11114.48 ▲17.3286.33 ▲41.90
Venues /wp-admin/edit.php?post_type=tribe_venue1,4823.9689.25102.18
Help /wp-admin/edit.php?post_type=tribe_events&page=tec-events-help2,5023.7567.79142.01
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,4682.3336.1236.67
Event Add-Ons /wp-admin/admin.php?page=tribe-app-shop3,3243.6066.60175.90
Add New /wp-admin/post-new.php?post_type=tribe_events7,82710.88275.98193.15
Troubleshooting /wp-admin/edit.php?post_type=tribe_events&page=tec-troubleshooting2,1344.2777.48122.40
Import /wp-admin/edit.php?post_type=tribe_events&page=aggregator5,0686.42470.24145.73
Event Add-Ons /wp-admin/edit.php?post_type=tribe_events&page=tribe-app-shop3,3563.6467.23165.92
Organizers /wp-admin/edit.php?post_type=tribe_organizer1,4793.9078.4689.52
Add New Venue /wp-admin/post-new.php?post_type=tribe_venue4,2059.69235.49192.90

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 tables in the database
    • wp_actionscheduler_actions
    • wp_tec_events
    • wp_tec_occurrences
    • wp_actionscheduler_logs
    • wp_actionscheduler_claims
    • wp_actionscheduler_groups
  • Zombie WordPress options were found after uninstall: 24 options
    • action_scheduler_hybrid_store_demarkation
    • schema-ActionScheduler_LoggerSchema
    • db_upgraded
    • tec_ct1_occurrences_table_schema_version
    • tec_ct1_migration_state
    • widget_recent-comments
    • tribe_last_generate_rewrite_rules
    • tec_timed_tribe_supports_async_process
    • tec_timed_tec_custom_tables_v1_initialized
    • tribe_last_save_post
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 72× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/the-events-calendar/src/views/embed/meta.php
    • > /wp-content/plugins/the-events-calendar/common/src/Tribe/Main.php
    • > /wp-content/plugins/the-events-calendar/src/Tribe/Cost_Utils.php
    • > /wp-content/plugins/the-events-calendar/src/admin-views/organizer-meta-box.php
    • > /wp-content/plugins/the-events-calendar/src/Tribe/Options_Exception.php
    • > /wp-content/plugins/the-events-calendar/src/views/v2/components/events-bar/views/list.php
    • > /wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/functions/classes.php
    • > /wp-content/plugins/the-events-calendar/src/views/v2/month/calendar-body/day/multiday-events/multiday-event/bar/title.php
    • > /wp-content/plugins/the-events-calendar/src/Tribe/Customizer/Single_Event.php
    • > /wp-content/plugins/the-events-calendar/common/src/Tribe/Admin/Help_Page.php
  • 965× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'TEC\\Events\\Custom_Tables\\V1\\Migration\\State' not found in wp-content/plugins/the-events-calendar/src/Events/Custom_Tables/V1/admin-views/migration/phase/cancel-in-progress.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/the-events-calendar/common/src/admin-views/widgets/components/fields/dropdown.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'TEC\\Common\\Monolog\\Handler\\StreamHandler' not found in wp-content/plugins/the-events-calendar/common/vendor/vendor-prefixed/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'TEC\\Common\\Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/the-events-calendar/common/vendor/vendor-prefixed/monolog/monolog/src/Monolog/Handler/FilterHandler.php:27
    • > PHP Notice
      Trying to get property 'exists' of non-object in wp-content/plugins/the-events-calendar/src/views/v2/latest-past/event/featured-image.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tribe() in wp-content/plugins/the-events-calendar/common/src/admin-views/help-calendar.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/the-events-calendar/src/Events/Custom_Tables/V1/admin-views/migration/icons/rerun.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/the-events-calendar/common/src/views/v2/components/icons/virtual.php:24
    • > PHP Notice
      Undefined variable: event in wp-content/plugins/the-events-calendar/src/views/v2/event-status/status-label.php on line 22
    • > PHP Fatal error
      Uncaught Error: Interface 'Tribe__Events__REST__Interfaces__Post_Repository' not found in wp-content/plugins/the-events-calendar/src/Tribe/REST/V1/Post_Repository.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: events, calendar, schedule, organizer, event

the-events-calendar/the-events-calendar.php Passed 13 tests

Analyzing the main PHP file in "The Events Calendar" version 6.2.8.1
128 characters long description:
The Events Calendar is a carefully crafted, extensible plugin that lets you easily share your events. Beautiful. Solid. Awesome.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected172,110 lines of code in 1,872 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,52531,422101,416120,155
JavaScript15411,84017,77645,332
CSS755364714,962
Markdown92710814
JSON200609
SVG10501238
HTML2060

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 124)
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity13.03
▷ Minimum class complexity1.00
▷ Maximum class complexity343.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity124.00
Code structure
Namespaces160
Interfaces75
Traits51
Classes936
▷ Abstract classes768.12%
▷ Concrete classes86091.88%
▷ Final classes111.28%
Methods7,926
▷ Static methods86810.95%
▷ Public methods6,37280.39%
▷ Protected methods1,19415.06%
▷ Private methods3604.54%
Functions675
▷ Named functions38857.48%
▷ Anonymous functions28742.52%
Constants338
▷ Global constants144.14%
▷ Class constants32495.86%
▷ Public constants31496.91%

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
125 compressed PNG files occupy 1.76MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/jquery/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
src/resources/images/events-bar/icon-day-hover@2x.png0.34KB0.65KB0.00%
common/src/resources/images/help/customizing.png93.87KB98.84KB0.00%
common/src/resources/images/help/getting-started.png67.13KB71.76KB0.00%
src/resources/images/migration/preview-prompt-screenshot.png66.29KB25.83KB▼ 61.03%