Codebase metrics¶
A measured snapshot of the Domain Path codebase and its submodules,
counted with cloc. Charts show code lines
(blank and comment lines excluded) unless stated otherwise.
Snapshot
Measured on the 3.x branch, 2026-07-02. 98 files,
5,827 lines of code, 2,635 comment lines,
1,386 blank (9,848 lines in total). See
Methodology to reproduce.
At a glance¶
| Code | Comment | Blank | Files | Production | Test |
|---|---|---|---|---|---|
| 5,827 | 2,635 | 1,386 | 98 | 2,974 | 2,853 |
Production vs test¶
Domain Path ships 2,853 lines of test code backing 2,974 lines of production code, a 96% test-to-production ratio.
Lines by language¶
| Language | Code | Comment | Blank | Files |
|---|---|---|---|---|
| PHP | 4,807 | 2,570 | 1,198 | 74 |
| Markdown | 464 | 0 | 181 | 6 |
| YAML | 261 | 65 | 7 | 13 |
| CSS | 258 | 0 | 0 | 1 |
| Text | 18 | 0 | 0 | 2 |
| JSON | 16 | 0 | 0 | 1 |
| SVG | 3 | 0 | 0 | 1 |
Composition¶
Across all languages, code is 59% of the lines, comments 27%, and blank lines 14%. The comment share reflects Drupal's docblock conventions.
By submodule¶
Production (brass) and test (steel) code per submodule, largest first.
| Submodule | Production | Test | Total |
|---|---|---|---|
| domain path (core) | 2,343 | 1,980 | 4,323 |
| domain_path_pathauto | 631 | 873 | 1,504 |
Test suite¶
Domain Path ships 34 automated test classes (93 test methods), counted by type below.
| Test type | Classes | Methods |
|---|---|---|
| Kernel | 15 | 67 |
| Functional | 17 | 21 |
| FunctionalJavascript | 2 | 5 |
| Total | 34 | 93 |
Architecture surface¶
What the module contains, counted across Domain Path and its submodules: the Drupal building blocks (services, plugins, hooks, routes, entities) that make up its public and internal API.
| Element | Count |
|---|---|
| Services | 16 |
| Event subscribers | 0 |
| Hook implementations | 10 |
| Routes | 1 |
| Permissions | 1 |
| Forms | 2 |
| Controllers | 0 |
| Content entity types | 0 |
| Config entity types | 0 |
| Config schema types | 1 |
| Plugins | 11 |
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.