← case studies·Softwarehub_shadowPre-registered · M_OSS1

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.

n = 25 modules23,000+ commits (2004–2024)3 layersr(function_coupling ↔ co_change) = 0.5156, p = 0.012Pre-registration hash: 6b22eafc…

What was measured

d1 — include_graph
Declared structure

Static PHP include/require edges between the 25 core modules in wp-includes/. Each directed edge is an explicit dependency in the source code.

d2 — function_coupling
Derived structure

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.

d3 — co_change
Behavioral signal

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.

function_coupling ↔ co_change
r = 0.5156
p = 0.012
CONFIRMED
Hypothesis 1 — law gradient
include_graph ↔ co_change
r = 0.2405
p = 0.244
baseline
d1 ↔ d3 reference
include_graph ↔ function_coupling
r = 0.4812
baseline
d1 ↔ d2 reference

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.

include_graph rank (declared)
#1
functions.php
#2
query.php
#3
formatting.php
#4
class-wp.php
#5
option.php
#19
post.php
co_change rank (behavioral)
#1
functions.php
#2
class-wp.php
#3
template.php
#4
post.php
#5
option.php
Finding

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.

Rank gap = 15. IRDME archetype: 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.

Moduleinclude_graphfn_couplingco_changearchetype
functions.php#1#2#2universal_hub
formatting.php#3#1#8relay
post.php#19#5#4hub_shadow
query.php#2#3#6relay
class-wp.php#4#8#3relay
option.php#5#4#7relay
user.php#8#6#11relay
meta.php#9#7#9relay
template.php#12#9#5relay
cache.php#20#20#20peripheral
Showing 10 of 25 modules. Full output: output_wordpress_v30.json

What this means for a migration

Without IRDME
  • ·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.
With IRDME
  • ·post.php is flagged as a hub shadow before planning begins.
  • ·Its interface is treated as a migration hazard — stabilize before touching adjacent modules.
  • ·functions.php confirmed 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.

DENIED — h5 · coherence threshold

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.

Denials with named mechanisms are part of the pre-registration record. The prediction file hash (6b22eafc…) is in the public repo and was committed before extraction.

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.

# Clone the source repo
git clone https://github.com/WordPress/wordpress-develop
# Extract all three layers (IRDME CLI)
irdme extract wordpress-develop --scope php --out wp_layers.json
# Run the law analysis
irdme wp_layers.json outputs/output_wp.json
# Inspect hub rankings and archetypes
irdme atlas wp_layers.json

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

M_OSS2 · Software
Next.js monorepo
r = 0.8995, p = 0.002

Strongest software gradient to date. 4 universal hubs. bundles = infrastructure chameleon (#2 co_change, #25 import_graph).

M_EXT · Software
Flask (external)
r = 0.6659, p = 0.015

First external-party validation. Gradient confirmed on data and repo not associated with IRDME. r_delta attenuates in mature codebases.

M_EXT2 · Neuroscience
C. elegans connectome
r = 0.7774, p = 0.004

Both data and layer definitions fully independent of IRDME. AVAL/AVAR top hubs — consistent with White et al. (1986).