What to Watch Out for in PHP Custom Development: Read the Code Before Quoting

The gap in second-development quotes usually comes down not to time spent, but **whether the code can actually be understood**. Quoting without reading it hands…

Insights:What to Watch Out for in PHP Custom Development: Read the Code Before Quoting

Check 1: Code Structure

  • Is there a unified entry point and routing.
  • Whether business logic is scattered throughout templates.
  • Whether there is a large amount of copy-pasted repetitive code.
  • Whether there is a reusable common layer.

Judgment: In projects where all logic resides in templates, any change can potentially cascade across the entire system.

Check 2: Dependencies & Versions

Item To Verify
Runtime Version Current version and target version
Framework Whether it is still maintained; whether there is an upgrade path
Third-party Libraries Whether there are known vulnerabilities; whether they can still be installed
Extensions Which PHP extensions it depends on

When versions are too old, secondary development may turn into "upgrade first, then develop."

Check 3: Database Coupling

  • Are table structures documented.
  • Whether business logic heavily relies on SQL string concatenation.
  • Whether there are stored procedures or triggers.
  • Whether there is legacy dirty data.

Risk: No documentation + logic hardcoded in SQL means changing a field could trigger cascading issues.

Check 4: Permissions & Security

  • Whether the admin panel has role-based access control.
  • Whether there are queries that directly concatenate SQL.
  • Whether uploads have type and size restrictions.
  • Whether there are hardcoded passwords or secrets.

Security issues tend to be amplified during secondary development, as new features often follow existing patterns.

Check 5: Documentation & Testing

  • Whether there are deployment documents.
  • Whether someone can explain the business rules.
  • Whether there are runnable tests or sample data.
  • Whether there are version management records.
  • For projects without documentation, estimating effort requires reading through the entire codebase.

    Evaluation Checklist Before Quoting

    1. Read through core workflow code (at least 1 day).
    2. List the modules and dependencies involved in the changes.
    3. Flag high-risk areas (no documentation, tight coupling, security gaps).
    4. Provide two quotes: one for "minimum changes" and one for a full refactoring.
    5. Document assumptions and how change orders are priced.

    Common Quotation Traps

    • Quoting by "feature points" without considering code quality.
    • Failing to state assumptions, turning every surprise into an upcharge later.
    • Underestimating regression testing, leading to issues after launch.
    • Promising "no structural changes," only to discover changes are unavoidable.

    How Clients Can Cooperate

    • Provide complete source code and database access.
    • Explain the background and rationale behind business rules.
    • Designate a business owner with authority to make decisions.
    • Accept the "evaluate first, quote later" process.

    Clients who demand a quote without evaluation often also request frequent changes later on.

    Scope & Boundaries

    The cost of secondary development depends on the quality of the legacy codebase and cannot be estimated by a uniform standard. This article provides an evaluation framework and does not constitute a commitment on timeline or price.

    Related Reading: