Codebase metrics¶
A measured snapshot of the Yoyaku 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-07-02. 357 files,
25,647 lines of code, 13,053 comment lines,
4,329 blank (43,029 lines in total). See
Methodology to reproduce.
At a glance¶
| Code | Comment | Blank | Files | Production | Test |
|---|---|---|---|---|---|
| 25,647 | 13,053 | 4,329 | 357 | 20,307 | 5,340 |
Production vs test¶
Yoyaku ships 5,340 lines of test code backing 20,307 lines of production code, a 26% test-to-production ratio.
Lines by language¶
| Language | Code | Comment | Blank | Files |
|---|---|---|---|---|
| PHP | 17,559 | 12,866 | 3,422 | 241 |
| YAML | 4,725 | 89 | 76 | 89 |
| Markdown | 1,847 | 0 | 432 | 19 |
| PO File | 644 | 9 | 326 | 1 |
| JavaScript | 601 | 73 | 36 | 1 |
| CSS | 183 | 16 | 37 | 3 |
| Text | 57 | 0 | 0 | 1 |
| JSON | 31 | 0 | 0 | 2 |
Composition¶
Across all languages, code is 60% of the lines, comments 30%, and blank lines 10%. 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) | 5,225 | 969 | 6,194 |
| yoyaku_payment | 3,458 | 1,884 | 5,342 |
| yoyaku_orchestra | 4,164 | 698 | 4,862 |
| yoyaku_ui | 2,254 | 356 | 2,610 |
| yoyaku_calendar | 1,711 | 494 | 2,205 |
| yoyaku_order | 1,460 | 326 | 1,786 |
| yoyaku_manager | 1,217 | 333 | 1,550 |
| yoyaku_api | 275 | 143 | 418 |
| yoyaku_node | 175 | 58 | 233 |
| yoyaku_webform | 153 | 79 | 232 |
| yoyaku_views | 215 | 0 | 215 |
Test suite¶
Yoyaku ships 44 automated test classes (196 test methods), counted by type below.
| Test type | Classes | Methods |
|---|---|---|
| Kernel | 39 | 185 |
| Functional | 5 | 11 |
| Total | 44 | 196 |
Architecture surface¶
What the module contains, counted across Yoyaku and its submodules: the Drupal building blocks (services, plugins, hooks, routes, entities) that make up its public and internal API.
| Element | Count |
|---|---|
| Services | 58 |
| Event subscribers | 13 |
| Hook implementations | 36 |
| Routes | 25 |
| Permissions | 7 |
| Forms | 25 |
| Controllers | 11 |
| Content entity types | 8 |
| Config entity types | 1 |
| Config schema types | 20 |
| Plugins | 37 |
Plugins break down by type as follows, largest first:
Methodology¶
Counts are produced with cloc from the
module root, excluding node_modules:
cloc --exclude-dir=node_modules .
Production and test totals split on the test directory:
# production
cloc --exclude-dir=node_modules --not-match-d='(^|/)tests(/|$)' .
# test
cloc --exclude-dir=node_modules --match-d='(^|/)tests(/|$)' .
Test classes are counted by their directory under tests/src (Unit, Kernel,
Functional, FunctionalJavascript); the method column counts test-prefixed
methods plus those annotated @test or #[Test]. The architecture surface counts
service definitions in *.services.yml, 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 JSON that cloc emits, so they need no JavaScript or charting plugin. This page is refreshed periodically.