Proj#1-Code Review - Check List
Proj#1-Code Review - Check List
I - DEVIATION OBJECTIVE
# I.1 – DEVIATION
Is every parameter of every method passing mechanism (value or
1 Yes
reference) appropriate?
Does every method return the correct value at every method return
2 Yes
point?
II - DEFECT OBJECTIVE
# II.1 – Variable and Constant Declaration
Are descriptive variable and constant names used in accord with
3 Yes
naming conventions?
4 Is every variable correctly (data) typed? Yes
5 Is every variable properly initialized? Yes
6 Are all for-loop control variables declared in the loop header? Yes
7 Are there variables that should be constants? No
8 Are there attributes that should be local variables? No
Do all attributes have appropriate access modifiers (private,
9 Yes
protected, public)?
# II.2 – Method Definition
Are descriptive method names used in accord with naming
10 Yes
conventions?
Do all methods have appropriate access modifiers (private,
11 Yes
protected, public)?
# II.3 – Class Definition
12 Does each class have an appropriate constructor? Yes / #NA
# II.4 – Data Reference
For every array reference: Is each subscript value within the
13 Yes
defined bounds?
# II.5 – Computation/Numeric
14 Are there any computations with mixed data types? No
15 Is overflow or underflow possible during a computation? No
16 Are parentheses used to avoid ambiguity? Yes
17 Are divisors tested for zero or noise? Yes
# II.6 – Comparison/Relational
18 For every boolean test: Is the correct condition checked? Yes
19 Are the comparison operators correct (i.e. ">=" instead of ">")? Yes
Has an "&" inadvertently been interchanged with a "&&" or a "|" for a
20 No
"||"?
21 Is every three-way branch (less,equal,greater) covered? Yes
# II.7 – Control Flow
22 Will all loops terminate? Yes
When there are multiple exits from a loop, is each exit necessary
23 Yes / #NA
and handled properly?
24 Does each switch statement have a default case? Yes / #NA
Are missing switch case break statements correct and marked with
25 Yes / #NA
a comment?
26 Can any nested if statements be converted into a switch statement? No / #NA
Are null bodied control structures correct and marked with braces or
27 No / #NA
comments?
28 Does every method terminate? Yes
29 Are all exceptions handled appropriately? Yes / #NA
# II.8 – Module Interface
Are the number, order, types, and values of parameters in every
30 Yes / #NA
method call in agreement with the called method's declaration?
# II.9 – Comment
Does every method, class, and file have an appropriate header
31 Yes
comment?
Does every attribute,variable or constant declaration have a
32 Yes
comment?
Is the header comment for each method and class consistent with
33 Yes
the behavior of the method or class?
34 Are all comments consistent with the code? Yes
35 Do the comments help in understanding the code? Yes
36 Are there enough comments in the code? Yes
37 Are there too many comments in the code? No
# II.10 – Layout and Packing
38 Is a standard indentation and layout format used consistently? Yes
39 For each method: Is it no more than about 60 lines long? Yes
# II.11 – Performance
Can the cost of recomputing a value be reduced by computing it
40 No
once and storing the results?
41 Can a computation be moved outside a loop? No
42 Are there tests within a loop that do not need to be done? No
III – AMBIGUITY OBJECTIVE
# III.1 – Variable and Constant Declaration
43 Are there variables with confusingly similar names? No
Are all variables properly defined with meaningful, consistent, and
44 Yes
clear names?
IV – REDUNDANCE OBJECTIVE
# IV.1 – Variables
45 Are there any redundant or unused variables or attributes? No
46 Could any non-local variables be made local? No
# IV.2 – Performance
Are there any blocks of repeated code that could be condensed into
47 No
a single method?
# IV.3 – Others
48 Are there SQL injections? No / #NA