WordPress vs Drupal: source lines of code compared

The WordPress vs Drupal comparison on OctoCounts shows side-by-side source line counts for WordPress/WordPress and drupal/drupal, counted under the rules and on the dates stated below: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

This page compares the source lines of code (SLOC) of WordPress/WordPress and drupal/drupal using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.

As of 2026-11-16, WordPress/WordPress contains 1,248,943 total lines (799,910 code) across 4,028 files, while drupal/drupal contains 791,861 total lines (415,946 code) across 7,771 files as of 2026-11-16. WordPress/WordPress has about 1.9x the counted code lines of drupal/drupal under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.

MetricWordPress/WordPressdrupal/drupal
Files4,0287,771
Total lines1,248,943791,861
Code lines799,910415,946
Comment lines313,803296,556
Blank lines135,23079,359
Languages counted1012

Top languages in WordPress/WordPress: PHP (47.8% of code), CSS (21.1% of code), JavaScript (18.2% of code). Top languages in drupal/drupal: PHP (69.3% of code), YAML (10.8% of code), CSS (8.5% of code). PHP, CSS, JavaScript appear in both top language lists; JSON, Sass appear only in WordPress/WordPress's top languages; YAML, Twig appear only in drupal/drupal's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. WordPress/WordPress was counted at ref master (commit 4cb0d2ab0889) on 2026-11-16; drupal/drupal was counted at ref main (commit e5c9f2142745) on 2026-11-16. See the counting methodology for ignored directories and analysis options.

Both reports use the same engine and effective counting rules. Repository declarations, when enabled, are specific to each repository. WordPress/WordPress: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed. drupal/drupal: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.

About this comparison

Background observations recorded on 2026-09-16; language descriptions here are historical context, not claims about the current filtered shares. Use this page's measured language breakdown for current counts. Repository layout before counting filters: WordPress/WordPress is the WordPress core repository — the PHP application core with its bundled default themes, bundled JavaScript, and administration UI assets. drupal/drupal is the Drupal core repository — the PHP content-management framework with its core modules and bundled assets. Both repositories are PHP CMS core trees, counted on the dates shown above.

The per-language tables of both reports show PHP as the dominant counted language, with a visible share of JavaScript for the administrative interfaces and bundled assets — typical of CMS codebases that ship their UI with the core.

Both repositories ship end-user-facing material — default themes, assets, and localization scaffolding — alongside the PHP core, so part of each count is content and presentation rather than application logic.

Core repository size says nothing about what a real site runs: production WordPress and Drupal sites add themes, modules/plugins, and uploaded content that dwarf the core, and site quality depends on those additions, not on these counts.

Sources: WordPress/WordPress repository (core with bundled themes) · drupal/drupal repository. Statements verified 2026-09-16.

Evidence and next steps:

Saved reports remain subject to cache cleanup and replacement. Export their JSON for durable citation; live report URLs can change.

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

Compare FAQ

Which has more lines of code, WordPress/WordPress or drupal/drupal?

As of 2026-11-16, WordPress/WordPress contains 1,248,943 total lines (799,910 code) across 4,028 files, while drupal/drupal contains 791,861 total lines (415,946 code) across 7,771 files as of 2026-11-16. WordPress/WordPress has about 1.9x the counted code lines of drupal/drupal under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.

Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for WordPress/WordPress, drupal/drupal, or any repository.

How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. WordPress/WordPress was counted at ref master (commit 4cb0d2ab0889) on 2026-11-16; drupal/drupal was counted at ref main (commit e5c9f2142745) on 2026-11-16. See the counting methodology for ignored directories and analysis options.

Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.