WordPress wp-includes:
post.php as a hub shadow
A structural analysis of WordPress wp-includes using three layers: static import graph, function coupling, and 20 years of git co-change history (23,000+ commits). The import graph ranks post.php at #19 out of 25 modules. The co-change layer ranks it #4.
What was measured
Static PHP include/require edges between the 25 core modules in wp-includes/. Each directed edge is an explicit dependency in the source code.
Shared function call coupling: two modules are coupled if they both call the same global function defined in wp-includes. This is structural, not declared.
Git co-modification: two modules are coupled if they were edited in the same commit. Extracted from the full public git history (github.com/WordPress/wordpress-develop), 2004–2024.
Data source: github.com/WordPress/wordpress-develop. Layer definitions and hypotheses were pre-registered before extraction. The hypothesis file SHA-256 hash (6b22eafc…) was committed to the public pre-registration repo before any analysis was run.
Cross-layer hub correlation
The Functional Proximity Law predicts r(d2 ↔ d3) > r(d1 ↔ d3). That is: function coupling (derived) should correlate more strongly with behavioral co-change than import structure (declared) does.
4 out of 5 pre-registered hypotheses CONFIRMED. h5 (inter-layer coherence) was DENIED with a named mechanism: WordPress's power-law degree distribution makes the coherence score trivially high for any software graph. The denial was informative — it identifies coherence alone as an insufficient discriminator for large, skewed codebases.
The hub shadow: post.php
A hub shadow is a node with a large rank gap between declared structure and behavioral signal. In WordPress wp-includes, post.php has the largest such gap.
post.php has import rank #19 out of 25 modules. Static analysis assigns it near-bottom importance. But across 23,000+ commits over 20 years, it is the 4th most co-modified file in the codebase. Every developer who changes core WordPress behavior touches it. The import graph does not encode this.
hub_shadow. Classification criterion: rank_gap ≥ 3 between any declared layer and any behavioral layer.Hub ranking table (selected modules)
Rank across all three layers. Hub importance is computed per layer independently.
| Module | include_graph | fn_coupling | co_change | archetype |
|---|---|---|---|---|
| functions.php | #1 | #2 | #2 | universal_hub |
| formatting.php | #3 | #1 | #8 | relay |
| post.php | #19 | #5 | #4 | hub_shadow |
| query.php | #2 | #3 | #6 | relay |
| class-wp.php | #4 | #8 | #3 | relay |
| option.php | #5 | #4 | #7 | relay |
| user.php | #8 | #6 | #11 | relay |
| meta.php | #9 | #7 | #9 | relay |
| template.php | #12 | #9 | #5 | relay |
| cache.php | #20 | #20 | #20 | peripheral |
| Showing 10 of 25 modules. Full output: output_wordpress_v30.json | ||||
What this means for a migration
- ·Import graph shows post.php at #19 — low priority for migration planning.
- ·Migration team allocates refactor effort to top static-import modules.
- ·post.php interface changes surface late, when they propagate to many other modified modules.
- ·The coupling is invisible in any static analysis tool.
- ·
post.phpis flagged as a hub shadow before planning begins. - ·Its interface is treated as a migration hazard — stabilize before touching adjacent modules.
- ·
functions.phpconfirmed as a universal hub — expected to be the costliest migration item regardless of analysis method. - ·The analysis runs on 23,000 commits in under 2 minutes using the IRDME CLI.
The same mechanism applies to any codebase with a public git history. The hub shadow pattern — high behavioral coupling, low declared importance — recurs across WordPress, Next.js, Flask, and the Linux kernel in IRDME's confirmed results. It is not a WordPress-specific artifact.
The denied hypothesis
Pre-registered hypothesis h5 predicted that inter-layer coherence would be at or above the 50th null percentile. It was at the 32nd.
Null model permutation: mean coherence across 1,000 random rewirings = 0.9726. Observed coherence = 0.9685. The real graph scored below the null mean.
Mechanism: WordPress's module graph has a strongly power-law degree distribution. Any graph with that distribution will show high coherence by construction, making the coherence score non-discriminative for large skewed software graphs. This is a named failure mode, not a measurement error. The correct discriminator for this class of graph is the r-gradient (d2 ↔ d3 vs d1 ↔ d3) with p-value — which was CONFIRMED at p = 0.012.
Reproduce this analysis
The full extraction pipeline is available via the IRDME CLI. The WordPress repo is public. The analysis is reproducible from the public git history.
The analysis uses only public data and open extraction logic. The pre-registration hash and prediction file are in github.com/vladi160/preregistrations.
Related results
Strongest software gradient to date. 4 universal hubs. bundles = infrastructure chameleon (#2 co_change, #25 import_graph).
First external-party validation. Gradient confirmed on data and repo not associated with IRDME. r_delta attenuates in mature codebases.
Both data and layer definitions fully independent of IRDME. AVAL/AVAR top hubs — consistent with White et al. (1986).