No bloated dependencies
Why it matters
Every runtime dependency you ship is inherited by every consumer. lodash (full) adds ~72KB minified; moment adds ~230KB. A focused SDK with full lodash as a runtime dependency imposes that weight on every browser bundle that installs it — directly increasing page load times and Lighthouse performance scores for users who never touch the offending methods. ISO 25010 resource-utilization flags this; SLSA L1 supply chain concerns apply because each runtime dependency is an additional attack surface. CWE-1357 covers use of unnecessarily broad software components.
Severity rationale
High because bloated runtime dependencies inflate every consumer's install size and bundle weight, and each transitive dependency expands the supply chain attack surface.
Remediation
Audit runtime dependencies and replace heavy packages with built-in alternatives or lighter substitutes.
// Before — heavy runtime deps:
{
"dependencies": {
"lodash": "^4.17.0",
"axios": "^1.0.0",
"moment": "^2.29.0"
}
}
// After — zero runtime deps:
{
"dependencies": {}
}
// Replace lodash.get with optional chaining:
// Before: _.get(obj, 'a.b.c', defaultVal)
// After: obj?.a?.b?.c ?? defaultVal
// Replace axios with built-in fetch (Node 18+):
// Before: const { data } = await axios.get(url)
// After: const data = await fetch(url).then(r => r.json())
Run npx bundlephobia-cli <package-name> before adding any new runtime dependency. Target: published package under 500KB gzipped.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the SDK / Package Quality Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · performance-efficiency.resource-utilization — Resource utilisation — bloated deps increase consumer install and bundle size
- ssdf:800-218 · PO.3.2 — Review and update software dependency requirements to reduce bloat and supply-chain risk
- slsa:1.0 · L1 — SLSA L1 — fewer runtime dependencies shrink the supply-chain attack surface
- cwe · CWE-1357 — Reliance on Insufficiently Trustworthy Component
Taxons
History
- 2026-04-18·v1.0.0·Initial import from sdk-package-quality·automated