Skip to content
Call 03333 20 97 97
bristol.digital: empowering ideas
Legacy PHP rescue and modernisation

Bug investigation and performance rescue

When every fix breaks something else, and nobody can say why it's slow.

In an old application, a "simple" bug can take days to trace: thousands of files, unfamiliar code, no tests, and logic spread across PHP, SQL and a server nobody has touched in years. Performance problems are worse, because the cause could be anywhere between the browser and the disk.

I find the actual cause, explain it in plain English, and fix it without creating the next bug.

Book a free conversation


Problems I investigate

Bugs

  • An intermittent fault nobody can reproduce
  • "Every fix breaks something else"
  • Wrong figures in reports, invoices or exports
  • Orders, emails or payments that sometimes fail
  • Behaviour that changed after a PHP, server or hosting change
  • A bug the previous developer "couldn't find"

Performance

  • Pages that take seconds, or time out
  • A site that slows down at busy times
  • Reports and exports that never finish
  • A server that's constantly maxed out
  • Slowness that got worse over time as data grew

Why legacy bugs are expensive

Before AI-assisted tools, most of the cost was archaeology: searching files, tracing code paths, working out which tables a process touched, finding where an obscure function was called, and understanding why changing one thing broke another.

AI-assisted analysis, combined with deep PHP experience, radically reduces that manual searching. Bugs that could previously consume days or weeks can sometimes be isolated in minutes. How I use AI

That doesn't mean guessing fast. Speed finding the cause isn't the same as safely changing the code. Fixes still need to be understood, tested and reviewed.


How I investigate bugs

  1. Reproduce it. If I can make it happen on demand, I can fix it. If it's intermittent, I work out the conditions.
  2. Trace it. Follow the behaviour through code, database and integrations to find where reality diverges from intention.
  3. Find the root cause, not just the symptom, so it doesn't return in another form.
  4. Explain it. You get a plain-English account of what went wrong and why.
  5. Fix it with a safety net. I add a test that captures the bug and the intended behaviour, so it can't quietly come back.
  6. Check what else it touches. Related code that shares the same flaw is flagged.
  7. Roll out carefully, via staging, with a way back.

How I diagnose performance

I diagnose the complete path rather than optimising one layer in isolation. Slowness can originate in:

Layer Typical causes
Application code Inefficient loops, repeated work, loading far more data than needed
Database queries Missing indexes, the "N+1" query pattern, huge unfiltered queries
Caching None at all, or misconfigured
PHP configuration Missing opcode caching, poor memory or process settings
External services Slow or failing third-party APIs, called synchronously
Storage Slow disks, huge directories, files processed on every request
Server resources Undersized hosting, competing cron jobs, memory pressure
Front end Heavy pages, unoptimised images, render-blocking scripts

I measure first (slow query logs, profiling, server metrics) and fix the biggest contributors first, so effort goes where the speed-up is, not where it looks interesting.

Often the result is dramatic: a handful of targeted fixes (an index, a cached query, a removed redundant call) can change a page from seconds to fractions of a second. Server and hosting migration and PHP upgrades may also help, since modern PHP is much faster.


What you receive

  • A plain-English explanation of the cause
  • The fix, tested and deployed in a controlled way
  • A regression test where practical
  • Before-and-after measurements for performance work
  • Notes on related risks I noticed along the way

What it costs

  • Defined bug fixes: I'll quote a fixed price once I've looked, where scope is clear
  • Open-ended or exploratory investigation: £950 per day
  • Urgent production problems: from £1,300 per day, subject to availability
  • Performance diagnosis can be scoped as a fixed-price audit followed by fixes

A minimum engagement applies to small requests.

Many clients find that the first investigation is cheaper than they feared, because finding the cause is now so much faster. Full pricing


For agencies

Have a client bug your team has been chasing for weeks? I can take the investigation white-label or direct. Agency terms


Frequently asked questions

Can you find a bug in code you've never seen?

Yes, that's normal. Understanding unfamiliar code quickly is exactly where experience and AI-assisted analysis help most.

What if the bug is intermittent?

It's harder, but not impossible. I work out the conditions that trigger it, using logs, data patterns and sometimes added instrumentation.

How long will it take?

Some bugs are found in minutes, some need days. I'll tell you early on if it looks like a quick find or a long one, so you can decide.

Will you add tests?

Where practical, yes. A test that captures the bug means it can't quietly return, and it starts building a safety net around fragile code.

Can you make our site faster without a rewrite?

Usually. Most legacy performance problems come from a small number of causes that can be found and fixed without rewriting anything.

What if the cause is the server or the PHP version?

I'll tell you, and cost the options honestly. Sometimes the best performance fix is a platform upgrade.


Tell me what you've inherited.

Describe the problem, even if you can't explain it. If it's been open for weeks, a conversation may save you a lot more.

Book a free conversationLegacy System Assessment, from £2,500

Call Book a free conversation