Metric can have different thresholds at the component (class) level and method level. Some metrics can be applicable only at one level while some can be applicable at both class and method levels.
Before going into the details of each metric, tables that show the threshold for each metric is given below-
Metrics | Component Level | Method Level |
---|---|---|
Lines of Code (LOC) | 1000 | 100 |
Executable Lines Of Code (ELOC) | 1000 | NA |
Lines Of Code Comments (LOC Comments) | NA | NA |
Comment Ratio (CR) | >30 | NA |
Number of Methods (NOM) | 10 | NA |
Number of Attributes (NOA) | 5 | NA |
Lack of Cohesion Of Methods (LCOM) | 77% | NA |
Number of Public Attributes (NOPA) | 0 | NA |
Cyclomatic Complexity (CC) | 50 | 10 |
Coupling Between Objects (CBO) | 30 | NA |
Depth of Inheritance Hierarchy (DOIH) | 5 | NA |
Response for Class (RFC) | 50 | NA |
Foreign Data Providers (FDP) | NA | 0 |
Locality of Attribute Accesses (LAA) | NA | 0.77 |
Number of Accessed Variables (NOAV) | NA | 9 |
Access To Foreign Data (ATFD) | 2 | 4 |
Max Nesting (MN) | NA | 5 |
Number of Parameters (NOP) | NA | 4 |
Number of Public Methods (NOPM) | 10 | NA |