You are on page 1of 4

Ecommerce Project Project

Code Review
March 2023
Findings
-> Image / Library file path are hard coded in some places.

-> The css styles found in the template files (.phtml).

-> Usage of the object manager in the php and phtml files.

-> Multiple if else statements and loops are used which makes it complicated to
understand the logic.

-> Static values are used in multiple places directly.


Need to follow coding practice
-> While using logger, along with the message print the class file and the function name for easy
debugging

-> Reduce the DB hit by optimizing the code and reduce looping logic.

-> While adding a new conditional statements, check the existing conditional statements if we can reuse it.

-> Add the ticket number in the comment line for easy reference of the feature.

-> Use const variable for static value.

-> Use the default functions for efficient coding.


Eg:- ‘BP’ which provided the project root folder path
Action item
We are planning to use the coding standard tool MEQP (Magento Extension Quality
Program) coding standard provided by Magento to check the followings
● Raw SQL queries
● SQL queries inside a loop
● Direct class instantiation
● Unnecessary collection loading
● Excessive code complexity
● Use of dangerous functions
● Use of PHP superglobals
● Code style issues

You might also like