CODEREVIEW The pointof the code review is to investigate the code that has been developed for a systemfor faults, strengths and weaknesses. This helps to develop ways to optimizethe code for better performance and helps improve documentation for higher codequality. This delivers an error-free/ bug -free application that meets the requirementsof the customer/ end -user. The following points describes the standard thatcode should be designed and should be used as a checklist for any functionalitythat has been added.
1. CodeObjectiveThe code for functionality X achievesits purpose for what it’s designed for. It should follow the following theobjectives below to ensure correct architecture and should follow the set codestandard and quality. See code standard and quality.2. Code doesn’tbreakValidations are used wherevernecessary. The code never breaks under any circumstances.
Especially underinvalid inputs that come from the end user. Examples of the inputs couldbe that they’re negative, over-sized or have an invalid format etc. Every inputpassed should be processed, sanitized before taking it further, to prevent codebreaking. Every object is checked for its actual data existence beforeaccessing its properties.
3. Responses forerrors Not just the error messages, everyresponse that is returned by the server must be properly handled. It shouldhave response messages, error codes and any other necessary details attached soresponses are as useful as possible to the end – user. The format of these responsesshould be as consistent as possible.
All possible scenarios are tested to avoiddeadlocks, timeouts, etc.4. Architectureis constant throughout Check that the approvedarchitecture/design is followed throughout the application. If there are anydesign changes required, make sure that these designs are documented, testedand approved before implementing them in the existing code.5. TestedEvery core method has a unit testwhich passes.6.
Reusable/NorepetitionAll methods serve a limited and clearpurpose follows the methodology of the DRY principle. Functions are reused whereverpossible. Any implementation of thesefunctions should be written in such a way that they can be re-used in thefuture implementations.
There is no duplication of code. 7. Code hasadequate/good performanceCode performance is good. There areno significant delays between the requests and responses. The code is scalableand able to handle a large amount of data and any upcoming features of addednew functionalities.
8. Code is secureThe code is secure in terms ofauthentications (with encryption), injections, unauthorized access, directorybrowsing, SQL injection, cross-side scripting, etc.