🎁 Perplexity PRO offert
The Disposable Code Illusion: Why AI Will Kill Your PrestaShop Store (If You Don’t Become an Architect Again)
🎙️ The Immersive Introduction: The “It Works First Try” Trap
In 2025, we’re living in a fascinating but terrifying time. As a senior developer at BusinessTech/PrestaModule, I see hundreds of lines of code every day. And for the past few months, a wind of panic (or misplaced euphoria) has been blowing through our community: Vibe Coding. You type three sentences into an LLM, get a script that “works”, and deploy it.
It’s thrilling, it’s fast, but it’s a ticking time bomb. We’re slowly sliding toward the concept of disposable code. And if we don’t correct course by returning to the fundamentals of software architecture, the awakening will be brutal for merchants and agencies.
Picture this scene. An e-merchant needs an urgent feature: a dynamic discount system based on weather for their gardening products. The agency, pressed for time and powered by tools like Cursor or Claude, generates a 150-line PHP snippet. They copy-paste it somewhere, test it: it works. The client is thrilled, the invoice is paid.
But here’s the cold reality: this code has no structure, no documentation, and completely ignores PrestaShop standards. Three months later, during a security update or migration to PrestaShop 9, everything collapses. The “disposable code” just cost three times its initial price in emergency maintenance.
In this article, I’ll explain why the apparent ease of AI is creating unprecedented technical debt in our ecosystem, and why your salvation lies in a renewed obsession with architecture and reusable code.
Part 1 – Context & Stakes: The Dangerous Commoditization of Code
We’ve shifted paradigms. Previously, code was expensive to write but relatively simple to understand once structured. Today, with AI, code has become cheap (or almost free) to generate, but extremely expensive to understand and maintain. 1
The Explosion of Duplicated Code
The numbers are staggering: in 2025, approximately 41% of global code is AI-generated. 2 However, a GitClear study reveals that code assistant adoption has led to an 8x increase in duplicated code blocks. Instead of creating a reusable function or clean Symfony service, AI often prefers to reinvent the wheel in each new file it generates.
The Decline of “Moved Code”
For us PrestaShop developers, the most alarming signal is the freefall of “moved code” (refactoring). Developers no longer reorganize their code to make it cleaner; they add successive layers of generated snippets. “Churn” (code added then quickly removed because it’s unstable) is expected to reach 7% this year. 3 This is the very definition of disposable code: we throw away what doesn’t work to regenerate another, never seeking global coherence.
Part 2 – Analysis: PrestaShop Is Not a Sandbox
Why is disposable code particularly toxic for PrestaShop? Because our favorite CMS relies on a robust but demanding architecture: Symfony, Doctrine, and a precise Hook system. 4
AI Often Ignores PrestaShop’s “Nuances”
AI is a syntax champion but a beginner in local business context. For example, an AI-generated script will often forget to handle dynamic table prefixes (ps_, shop1_, etc.) in PrestaShop, causing “Base table not found” errors as soon as the module is installed on another server. 6
The Security Risk of “Vibe Coding”
About 45% of AI-generated code contains security vulnerabilities. 7 Why? Because AI seeks to satisfy your “vibe” (your immediate intention) rather than respect security standards. We find SQL injections in 20% of cases and XSS vulnerabilities in 86% of tests on unsupervised AI code. 7 For an e-commerce merchant, such a flaw on a payment page means industrial catastrophe.
SOLID: More Essential Than Ever
We often hear that SOLID principles are “outdated”. That’s false. They are AI’s guardrails.
- Single Responsibility (SRP): If you ask AI to modify a 1000-line class, it will hallucinate. If your architecture is broken down into small specialized services, AI becomes a surgical assistant with remarkable precision. 1
- Interface Segregation: By defining clear contracts, you prevent AI from “guessing” methods that don’t exist.
Part 3 – Practical Application: The “Disposable” Module vs. the “Architected” Module
Let’s take a real case: creating a custom “Loyalty Points” module.
The “Disposable Code” Scenario (The 10-Minute Approach)
The developer asks AI: “Build me a PrestaShop module that adds points with each order.”
Result: A big loyalty.php file with hardcoded SQL, discount calculations directly in the displayOrderConfirmation hook, and no tax handling.
The problem: If the merchant changes their calculation rule or wants to export points to a CRM, everything must be rewritten. The code is “glued” to PrestaShop inseparably.
The “Architected” Scenario (The Orchestrated Approach)
Here, we use AI to generate components, but we impose the structure:
- Service Layer: We ask AI to create a
PointCalculatorclass independent of PrestaShop. - Repository: We use Doctrine to handle persistence, respecting dynamic prefixes. 6
- Hooks: We use hooks only to call our services.
The advantage: The code is testable, reusable, and most importantly, documented. A maintenance AI will be able to understand it because it follows a known “pattern”. 8
Part 4 – Vision & Future Impact: Becoming the Orchestrator, Not the Copyist
The PrestaShop developer profession is mutating. The “code monkey” is dead, replaced by AI. But the Systems Architect has never been more valuable. 9
AI as a “Luxury Intern”
Think of AI as an ultra-fast intern but with no long-term vision. It’s up to you to define the foundations, the plumbing, and the security rules. 10 In 2025, your added value isn’t knowing how to write a foreach in PHP, but knowing how to structure your data to be scalable.
Toward “AI-Ready” Modules
The next step? Design modules whose code is so well structured (atomic files, clear interfaces) that they become “digestible” for future maintenance AI agents. 8 A well-architected PrestaShop store in 2025 will be able to self-repair because AI will understand its intention, not just its syntax. 11
Engaging Conclusion: Escape the Tyranny of the Immediate
“Disposable code” is a hard drug. It gives the impression of short-term superpower, but it destroys the value of your work (and your client’s business) in the long term.
For agencies and developers, the challenge is to resist the temptation of sloppy “all-AI” development. Use AI to accelerate production of your components, but never abandon the building’s blueprint to it.
So, would you rather deliver a script that shines today but fades tomorrow, or build a module that will survive the next three major versions of PrestaShop?
The ball is in your court. Become architects again. 🏗️✨
Related Resources
Questions Fréquentes
What is "Vibe Coding"?
Vibe Coding is a development approach where you type a few sentences into an LLM (like ChatGPT or Claude), get a script that “works”, and deploy it immediately without real structure. It’s fast and thrilling, but it’s a ticking time bomb for code maintenance and scalability.
Why is AI-generated code problematic for PrestaShop?
AI excels at syntax but is weak on business context. It often ignores PrestaShop nuances like dynamic table prefixes, the Hook system, or the Symfony/Doctrine architecture. About 45% of AI code contains security vulnerabilities, and AI prefers to duplicate code rather than create reusable abstractions.
Are SOLID principles still relevant in the AI era?
More than ever! SOLID principles are AI’s guardrails. If you ask it to modify a 1000-line class, it will hallucinate. But if your architecture is broken down into small specialized services (Single Responsibility), AI becomes a surgical assistant with remarkable precision.
What's the difference between a "disposable" module and an "architected" module?
A disposable module puts all code in one big file with hardcoded SQL and no separation of concerns. An architected module uses a Service Layer, Doctrine Repositories, and Hooks to orchestrate logic. The first is quick to create but impossible to maintain. The second takes more time initially but remains scalable for years.
How can I use AI without creating technical debt?
Think of AI as an “ultra-fast intern” to generate your components, but you define the architecture, interfaces, and security rules. Use AI to accelerate production of atomic code (a function, a simple class), not to design all your business logic. Stay the architect, let AI be the mason.
Is PrestaShop free?
Yes, PrestaShop is an open-source and free e-commerce CMS. You only pay for hosting and premium modules.
Articles Liés
Oubliez Python : Pourquoi PHP est le véritable avenir de l'IA pour le Web
Vous pensez que pour faire de l'IA, vous devez apprendre Python et les mathématiques complexes ? Faux. Python est le ...
Arrêtez de réinventer la roue : 5 pépites cachées dans le fichier Tools.php de PrestaShop
Vous pensez que le "Clean Code" est la seule voie ? Détrompez-vous. Parfois, l'efficacité brutale se cache dans les v...
Pourquoi PrestaShop gagne justement parce qu'il n'est PAS un SaaS
Le SaaS est-il un piège doré ? Découvrez pourquoi le modèle "propriétaire" de PrestaShop offre un meilleur ROI à long...
PrestaShop rejoint cyber_Folks & Sylius : Le Big Bang de l'Open Source Européen (et ce que ça change pour vous)
C'est officiel : PrestaShop rejoint l'écosystème cyber_Folks aux côtés de Sylius. Ce n'est pas juste une acquisition,...
La "jungle" des modules PrestaShop : Une chance inespérée pour votre site ?
Avec plus de 4 000 modules disponibles, PrestaShop est souvent critiqué pour son foisonnement. Découvrez pourquoi cet...
Développement PrestaShop : Le vrai problème vient-il de la documentation ?
80% des "bugs" PrestaShop sont en réalité des erreurs d implémentation. Découvrez comment la documentation officielle...
Découvrez mes autres articles
Guides e-commerce, tutoriels PrestaShop et bonnes pratiques pour développeurs
Voir tous les articlesPlanification LinkedIn
Date de publication : 13 janvier 2026
Temps restant :