Why we don’t ship a line of code the site doesn’t use

There’s a habit in web development that feels responsible but isn’t: keeping code around “just in case.” A whole library loaded to use one function from it. A theme’s demo features left switched on. A block of script copied in to fix something two years ago that nobody dares delete. None of it is used — and all of it still ships to your readers and sits in the code your team has to maintain.

Dead weight is still weight

Unused code doesn’t become harmless just because nobody calls it. The browser still downloads it. The server still loads it. Your developers still have to read past it, test around it, and wonder whether it’s safe to touch. Every kilobyte and every unclear line is a small tax you pay on every page view and every change.

Where the bloat hides

  • Big libraries for small jobs: pulling in a heavy framework to use a single helper.
  • Demo and “kitchen-sink” features: themes and plugins that ship with everything turned on, most of which you’ll never use.
  • Copy-paste leftovers: snippets added to solve one problem and never removed.
  • “Temporary” code: the most permanent kind there is.

Why lean code wins on every axis

It’s faster, because the reader only downloads and runs what the page actually needs. It’s safer, because every line you don’t ship is a line that can’t break or be exploited. And it’s cheaper to maintain, because a developer opening the project can understand it — there’s no archaeology, no guessing which parts are load-bearing.

It’s a discipline, not a one-time cleanup

You can’t bolt leanness on at the end. It comes from a default: add code only when the site needs it, and remove it the moment it stops being used. “We might need it later” is almost always cheaper to solve later than to carry now.

How we build

At Peyotto, the rule is simple — if the site doesn’t use it, it doesn’t ship. We’d rather write the small, specific thing a site needs than inherit a giant general-purpose one and hope we grow into it. On a high-traffic site that discipline is the difference between a page that loads instantly and one that drags a little more with every “just in case” nobody removed.