Skip to content

Codebase metrics

A measured snapshot of the Yoyaku Booking Engine codebase and its submodules, counted with cloc. Charts show code lines (blank and comment lines excluded) unless stated otherwise.

Snapshot

Measured on the 1.x branch, 2026-10-21, with cloc 2.08. 1,474 files, 166,010 lines of code, 96,961 comment lines, 25,372 blank (288,343 lines in total). See Methodology to reproduce.

At a glance

Code Comment Blank Files Production Test
166,010 96,961 25,372 1,474 105,904 60,106

Production vs test

Yoyaku Booking Engine ships 60,106 lines of test code backing 105,904 lines of production code, a 57% test-to-production ratio.

Lines by language

Language Code Comment Blank Files
PHP 112,752 91,936 19,689 1,194
JSON 20,802 0 0 3
Markdown 10,316 2 2,351 49
YAML 10,112 1,098 403 184
JavaScript 4,906 2,900 249 10
PO File 4,851 79 2,372 1
CSS 1,530 610 300 15
SVG 290 0 5 3
Text 227 0 0 3
Twig 224 336 3 12

Composition

Across all languages, code is 58% of the lines, comments 34%, and blank lines 9%. The comment share reflects Drupal's docblock conventions.

By submodule

Production (brass) and test (steel) code per submodule, largest first.

Submodule Production Test Total
yoyaku (core) 30,860 14,253 45,113
yoyaku_placement 19,916 23,533 43,449
yoyaku_placement_io 20,230 608 20,838
yoyaku_ui 6,834 3,284 10,118
yoyaku_calendar 3,953 3,669 7,622
yoyaku_order 3,152 2,472 5,624
yoyaku_orchestra_example 4,762 716 5,478
yoyaku_payment 1,552 2,306 3,858
yoyaku_orchestra 1,405 1,648 3,053
yoyaku_manager 2,096 930 3,026
yoyaku_booking_fee 956 1,369 2,325
yoyaku_ticket 1,590 621 2,211
yoyaku_orchestra_order 861 1,074 1,935
yoyaku_orchestra_payment 853 1,065 1,918
yoyaku_placement_example 1,680 0 1,680
yoyaku_domain 601 563 1,164
yoyaku_presentation 799 125 924
yoyaku_checkin 675 237 912
yoyaku_order_easy_email 668 127 795
yoyaku_webform 254 523 777
yoyaku_node 495 201 696
yoyaku_views 313 205 518
yoyaku_api 274 208 482
yoyaku_order_views 323 0 323
yoyaku_payment_views 305 0 305
yoyaku_cart 187 70 257
yoyaku_orchestra_manager 95 126 221
yoyaku_ticket_placement 71 123 194
yoyaku_calendar_interaction 70 50 120
yoyaku_orchestra_cart 53 0 53
yoyaku_manager_views 21 0 21

Test suite

Yoyaku Booking Engine ships 355 automated test classes (1,661 test methods), counted by type below.

Test type Classes Methods
Kernel 303 1,551
Functional 24 35
Unit 15 51
FunctionalJavascript 13 24
Total 355 1,661

Architecture surface

What the module contains, counted across Yoyaku Booking Engine and its submodules: the Drupal building blocks (services, plugins, hooks, routes, entities) that make up its public and internal API.

Element Count
Services 203
Event subscribers 26
Hook implementations 206
Routes 104
Permissions 12
Forms 72
Controllers 33
Content entity types 23
Config entity types 5
Config schema types 64
Plugins 126

Plugins break down by type as follows, largest first:

Methodology

This page is generated by scripts/generate-metrics.php, run from the module root after a change worth reflecting:

php scripts/generate-metrics.php

It measures the files git ls-files reports, so a checkout that has installed vendor/, previewed the docs into site/ or pulled a node_modules/ counts the same as the archive a release ships. This page is left out of that list: the script writes it, and a page that counts itself changes the tree it just measured, so no two regenerations agree. The snapshot above names the cloc version, because cloc counts differently from one version to the next; that is the version to run to reproduce this page, and the version the pipeline installs.

Each file is attributed to the nearest enclosing module (a directory with a *.info.yml); test-support modules under a tests/ path count as their parent's test code. A file is test code when its path contains a tests/ segment, production otherwise.

Test classes are counted by their directory under tests/src (Unit, Kernel, Functional, FunctionalJavascript); the method column counts each test-prefixed method, and each further one annotated @test or #[Test]. The architecture surface counts service definitions in *.services.yml (excluding aliases), route and permission keys in *.routing.yml and *.permissions.yml, #[Hook] attributes, plugin classes under src/Plugin/, forms and controllers under src/Form and src/Controller, entity-type attributes in src/Entity, and top-level types in config/schema/*.yml, all summed across the module and its submodules.

The charts are static inline SVG generated from the measured data, so they need no JavaScript or charting plugin. They are decorative and marked aria-hidden: every figure one of them draws is also in the table or the sentence beside it, so a screen reader gets the numbers rather than an image with no name. An img role carrying no accessible name is worse than no role at all, because it hides the labels inside the chart as well.