Update Deliverable_3 authored by Hiba Ajaz (kmu295)'s avatar Hiba Ajaz (kmu295)
......@@ -446,6 +446,53 @@ _**Herin's Report to Amna**_
_**Hiba's Report to Herin**_
## Recipe & AI Features Code Inspection
| Category | Inspection Question | Answer |
|----------|---------------------|--------|
| **General** | Does the code work as intended for the feature being reviewed? | Mostly: recipe creation, editing, deletion work, but AI generation has parsing bugs |
| **General** | Is the code easy to read and understand? | Mostly yes, but some confusing variable names |
| **General** | Does the code follow team coding conventions? | Yes for React, inconsistent elsewhere |
| **General** | Any repeated logic that should be moved to shared utilities? | Yes - image parsing, validation, allergen detection |
| **General** | Is the component or function modular? | Mostly yes |
| **General** | Any unnecessary global variables or shared state? | No |
| **General** | Any commented-out code that should be removed? | Yes, should be removed |
| **General** | Are loops/maps/async workflows properly controlled? | Yes |
| **General** | Do variable/function names clearly describe their purpose? | Mostly yes |
| **Performance** | Any expensive operations running too often? | Yes - image handling, console logs |
| **Performance** | Can built-in methods replace custom loops? | Already using them |
| **Performance** | Any unnecessary console logs/debug statements? | Yes, many left in |
| **Performance** | Are API calls grouped efficiently? | Yes |
| **Security** | Are backend inputs validated before queries? | Basic validation only |
| **Security** | Are database queries protected (parameterized)? | Yes, using parameterized queries |
| **Security** | Are third-party errors handled properly? | Partially |
| **Security** | Are invalid parameters rejected correctly? | Partially |
| **Security** | Is protectRoute used correctly? | Yes |
| **Documentation** | Are comments meaningful where logic is complex? | Some, but insufficient |
| **Documentation** | Are API routes documented? | Partially |
| **Documentation** | Are edge cases explained? | No |
| **Documentation** | Are third-party libraries used clearly? | Yes |
| **Documentation** | Are TODOs marked clearly? | Yes |
| **Documentation** | Are data structures explained? | Partially |
| **Testing** | Is the code structured to be testable? | Mostly yes |
| **Testing** | Can functions be manually tested? | Yes |
| **Testing** | Are input validations testable? | Yes |
| **Testing** | Could custom logic be replaced with built-ins? | Some could be replaced |
| **Implementation** | Are variable names descriptive? | Mostly yes |
| **Implementation** | Any confusing or similar variables? | Yes - `Idescription`, `Ingredients` typos |
| **Implementation** | Are variables/state initialized properly? | Yes |
| **Implementation** | Can non-local variables be moved inside functions? | No issues |
| **Implementation** | Should literal values be constants? | No - missing limits, boundaries |
| **Implementation** | Are constants used for reused values? | No |
| **Implementation** | Are function/handler names descriptive? | Mostly yes |
| **Implementation** | Are parameters validated before use? | Partially |
| **Implementation** | Do functions return correct structures/status codes? | Yes |
| **Implementation** | Any possible overflow/invalid values in calculations? | No |
| **Implementation** | Are parenthesis/grouping used properly? | Yes, clear |
| **Implementation** | Are async operations handled safely? | Mostly yes |
| **Implementation** | Do loops/branches terminate correctly? | Yes |
| **Implementation** | Are if-else/switch structures complete and readable? | Yes |
_**Aron's Report to Hooriya**_
......
......