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 LevelMethod Level
Lines of Code (LOC)1000100
Executable Lines Of Code (ELOC)1000NA
Lines Of Code Comments (LOC Comments)NANA
Comment Ratio (CR)>30NA
Number of Methods (NOM)10NA
Number of Attributes (NOA)5NA
Lack of Cohesion Of Methods (LCOM)77%NA
Number of Public Attributes (NOPA)0NA
Cyclomatic Complexity (CC)5010
Coupling Between Objects (CBO)30NA
Depth of Inheritance Hierarchy (DOIH)5NA
Response for Class (RFC)50NA
Foreign Data Providers (FDP)NA0
Locality of Attribute Accesses (LAA)NA0.77
Number of Accessed Variables (NOAV)NA9
Access To Foreign Data (ATFD)24
Max Nesting (MN)NA5
Number of Parameters (NOP)NA4
Number of Public Methods (NOPM)10NA