Audit Deprecation Age
Homeboy audit flags @deprecated X.Y.Z docblock tags that are significantly older than the
component’s current version. This surfaces ancient deprecations that are overdue for removal.
How it works
- Resolve the component’s current version from either the WordPress plugin header (
Version: X.Y.Zin a*.phpfile at the component root) or thecomposer.jsonversionfield. - Scan every file fingerprint for docblock tags matching
@deprecated X.Y.Z(including the@deprecated since X.Y.Zvariant and trailing prose). - Compare each tag to the current version. Flag when the deprecation is older than the threshold:
- Current major strictly greater than the deprecated major, OR
- Same major and
current.minor - deprecated.minor > 2.
- Count remaining references to the nearest following symbol (function, method, class, trait,
interface) across
internal_callsandcall_sitesfrom every fingerprint. Include that count in the finding description and suggestion.
Malformed @deprecated tags without a semver token are ignored. Tags within the threshold are also
ignored.
Finding output
- Current major strictly greater than the deprecated major, OR
- Same major and
current.minor - deprecated.minor > 2.
Each finding reports the line number, the tagged version, the current version, and the remaining call-site count so reviewers can judge whether the deprecated symbol is safe to delete.