hello@mazharsiddiqi.com

CODE AUDIT & REFACTORING

Know what you inherited.

An honest assessment of a stalled, inherited, or acquired codebase before deciding whether to continue, improve it, or replace it.

WHEN YOU NEED ONE

When an audit is worth doing.

01

Before acquiring a product

Technical due diligence before the price is agreed and a hidden rebuild becomes your problem.

02

After inheriting a build

A developer left, an agency was replaced, or the project changed hands without a useful handover.

03

When a project stalled

The previous team said it was nearly finished, but the reality does not match the status report.

04

Before committing to a rebuild

A large decision that should be based on evidence rather than the instinct that the code feels messy.

05

When delivery keeps slowing down

Every feature takes longer than the last and nobody can name the structural reason.

06

Before hiring

The state of the codebase tells you what kind of developer or team you actually need next.

WHAT I LOOK AT

The evidence behind the verdict.

The audit focuses on the technical choices that determine whether the system can safely support the work you need next.

Architecture

How the system is organised, what it can support, and where future work will meet resistance.

Code quality & dependencies

Readability, consistency, duplication, outdated packages, and whether a new developer can change it safely.

Security & data model

Authentication, authorisation, credentials, dependency vulnerabilities, schema integrity, and extension risk.

Performance & delivery

Obvious bottlenecks, testing, deployment, documentation, and knowledge trapped in one person’s head.

WHAT YOU GET

A report that leads to a decision.

The output is written for the person making the commercial call as well as the developer who may carry out the work.

01

Overall verdict

Continue, refactor incrementally, or rebuild, with the reasoning behind the recommendation.

02

Critical issues

Security problems and structural faults that deserve action regardless of the chosen path.

03

Effort estimates

The commercial cost of each path, so the next decision is not emotional or based on a guess.

04

Prioritised plan

Work ordered by risk and impact rather than by the easiest ticket to close.

05

Known and unknown risks

A direct account of what could be assessed, what could not, and why that uncertainty matters.

THE NEXT DECISION

Refactor, continue, or rebuild.

Refactoring is incremental work that makes a codebase maintainable without stopping delivery. It restructures one area at a time, keeps refactor commits separate from feature work, and adds protection around anything being changed.

A rebuild is only justified when the architecture cannot support the next requirement, the technology is unsupported, the data model is fundamentally wrong, or fixing it exceeds replacing it. Ugly code alone is not enough.

Continue

When the system is sound and the real issue lives outside the code.

Refactor

When the product works but delivery needs to become safer and faster.

Rebuild

When the foundation cannot carry the work that matters next.

THE PRINCIPLE

Working code is not automatically bad code.

Developers reach for rebuilds too quickly because writing new code is easier than understanding an existing system. That instinct is often expensive and wrong.

The goal is not a codebase that matches my preferences. It is a codebase your team can work in with an honest view of the trade-offs.

“The right recommendation is the one that remains true after I am no longer involved.”

The operating principle

COMMON QUESTIONS

Audits, clearly scoped.

The practical questions before repository access is shared and a major technical decision is made.

How long does an audit take?

Usually three to five days depending on the size and condition of the system. Large systems take longer, and that is clear before work starts.

Which technologies can you audit?

JavaScript, TypeScript, Node.js, React, React Native, WordPress, and Shopify. Outside these, I would be guessing and will say so.

Will you recommend a rebuild to create more work?

The most common recommendation is incremental improvement. A rebuild is only sensible when the architecture, data model, or unsupported technology makes it unavoidable.

Can you take over an existing project?

Often, after the audit has established what both sides are actually agreeing to.

Do you provide technical due diligence for acquisitions?

Yes, within the technologies listed above.

What if the previous developer is unavailable?

That is normal. The audit works from the code, infrastructure, and documentation that exist.

Not sure what you inherited?

Give me repository access and a few days. You will get a straight answer about what you are holding and what each viable option costs.

Evidence-led verdictCommercial estimatesClear next step