A code audit is a review of a website's code and database to identify potential bugs, bottlenecks etc. The result of an audit is a report outlining areas that need to be improved and a roadmap explaining how to implement necessary changes.
At SixBySix we specialise in performing code audits on Magento websites to identify problems and suggest solutions that will help your store (and hopefully sales) grow.
Why Do You Need an Audit?
A Magento application audit can help if your website is suffering from any of the following:
- Expensive maintenance costs
- Slow load times for your site
- Difficulty upgrading to a newer version of Magento
- Frequent system crashes and errors
What are we looking for?
Core File Overrides
When developing a Magento extension which attempts to modify core behaviour it is best practice to utilise event observers. Unfortunately, this is not always possible and so it may be necessary to use an override. This is a potentially problematic practice as it may cause incompatibilities between different extensions which are attempting to override the same code.
When a developer is forced to use an override it is also important to ensure that only necessary code is overridden; very often a developer will copy the entire core file into a local codepool file when they only need to modify a single line. This can cause issues when attempting to upgrade the Magento installation, as the override will still be in place and any fixes (e.g. bugs, security fixes etc.) will be ignored.
We will prepare a report regarding the core file overrides currently in place within the your codebase, identify conflicts between installed extensions, and make suggestions regarding how any problematic overrides can be modified to prevent potential problems and keep the codebase maintainable.
Core File Modifications
Another method that some developers fall back on is to modify the core codepool files to inject their desired changes. This is never an acceptable solution, as when the time comes to upgrade the Magento codebase to a later version, the core file modifications will be overwritten and bespoke behaviour will be lost; potentially leading to a time-consuming investigation.
We will identify any core modifications currently within the codebase, identify the developer's the reason for these modifications, and propose a better solution.
We will use automated and manual investigation to evaluate the current status of the local and community codepools. These tests will identify areas for improvement with regards to adhering to Magento coding standards and we will propose changes that can be made to make the codebase compliant.
Magento’s templating system is block-based, meaning that the code within templates should be kept as light as possible with the bulk of business logic being abstracted into Block classes. The advantages of this are:
- Easier for non backend-developers to focus on presentation
- Reduced code duplication in multi-store systems
- Less chance of unnecessary legacy code remaining in code-base
- Better caching for faster page load times
Profiling is a technique used to identify inefficiencies in an application by monitoring every function call and recording the duration of each one’s execution. This allows you to locate bottlenecks in the application (e.g. slow database queries) and determine how to resolve them.
Using the data gathered from these tests we’ll identify areas that we feel are contributing to the slow page-speeds being experienced by customers. Additionally, we’ll recommend solutions to the problems and include an estimate for each.
3rd Party Extensions
Our developers will look at the various modules that have been installed on your Magento store. We will ensure that the modules are following best practices and are not affecting the performance of your site negatively.
Our client was experiencing extremely slow load times on their live site; sometimes up to 12 seconds per request. Almost immediately we were able to determine that the problem lay with a popular extension's anti-piracy solution. In an attempt to prevent unauthorised Magento stores from using their extension they were executing a request to their own servers for verification. Unfortunately, their server was undergoing it's own performance problems and preventing our client's website from loading quickly.
Having identified the issue we were able to suggest an alternative 3rd party extension offering the same features but without the best practice violations. Our client immediately saw their page speed times reduce from 12 seconds to 2 seconds per request.
After we've performed the audit, we'll provide you with a report detailing the various issues existing within your website. For each issue we will also include an estimate of the time that we believe it would take to implement a solution. By prioritising the improvements that we feel will yield the greatest results, we will present you with a roadmap outlining the next steps you should take if you decide to proceed.