Expert Articles

Magento ECG Expert Articles

Magento's Expert Consulting Group (ECG) is at the forefront of eCommerce innovation. Our premier experts have vast experience working with top merchants globally, and we will continuously publish articles on topics that are important for technologists working with Magento.

Conquer the 5 Most Common Magento Coding Issues to Optimize Your Site for Performance

By: Olexander Zarichniy | December 3rd, 2013

In any eCommerce implementation, system performance can mean the difference between satisfied customers and frustrated customers who shop elsewhere. In particular, PHP code performance issues can have immediate critical impact to the business. Although this type of issue is much easier to spot and fix using static code analysis than performance or scalability issues related to software design, the exact level of impact cannot be measured accurately without application profiling and monitoring, because these methods provide information on how often the code is executed and on what amounts of data.

This article provides a high-level overview of the most common issues that can impact performance and scalability of the Magento PHP code. These issues are created by Magento PHP developers during software implementation and do not relate to hardware, application or database design, or data access SQL code.

Developers who are new to Magento can use this article as a guideline on how to write optimized PHP code. This article can also serve as a checklist of reminders for experienced Magento developers.

Top 5 Issues

The Magento Expert Consulting Group (ECG) has conducted dozens of code audits of client codebases and mined about 300 common coding issues made by PHP developers. About 28% of all issues affect performance and scalability of the code. The top 5 performance coding issues represent 84% of all performance issues. They were encountered in 96% of client codebases. In this article, ECG presents detailed descriptions of the top 5 Magento PHP code performance issues along with the examples of code and recommendations on how to avoid them.