Skip to content

Codebase metrics

A measured snapshot of the WebDAV 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. 102 files, 8,268 lines of code, 4,778 comment lines, 1,531 blank (14,577 lines in total). See Methodology to reproduce.

At a glance

Code Comment Blank Files Production Test
8,268 4,778 1,531 102 4,874 3,394

Production vs test

WebDAV ships 3,394 lines of test code backing 4,874 lines of production code, a 70% test-to-production ratio.

Production 4,874 · 59% Test 3,394 · 41%

Lines by language

PHP 6,165 Markdown 1,476 YAML 422 JavaScript 95 Text 64 JSON 26 SVG 20
Language Code Comment Blank Files
PHP 6,165 4,505 1,174 64
Markdown 1,476 0 320 8
YAML 422 163 30 26
JavaScript 95 109 6 1
Text 64 0 0 1
JSON 26 0 0 1
SVG 20 1 1 1

Composition

Across all languages, code is 57% of the lines, comments 33%, and blank lines 11%. The comment share reflects Drupal's docblock conventions.

Code 8,268 · 57% Comment 4,778 · 33%

By submodule

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

webdav (core) 7,324 webdav_key 656 webdav_lock_pdo 264
Submodule Production Test Total
webdav (core) 4,320 3,004 7,324
webdav_key 451 205 656
webdav_lock_pdo 103 161 264

Test suite

WebDAV ships 24 automated test classes (165 test methods), counted by type below.

Kernel 15 Functional 4 Unit 5
Test type Classes Methods
Kernel 15 107
Functional 4 12
Unit 5 46
Total 24 165

Architecture surface

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

Element Count
Services 18
Event subscribers 0
Hook implementations 5
Routes 5
Permissions 4
Forms 3
Controllers 2
Content entity types 0
Config entity types 1
Config schema types 3
Plugins 1

Plugins break down by type as follows, largest first:

Field 1

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.