CK Metrics
Chidamber and Kemerer Object-Oriented Metrics · Also known as: OO metrics, CK suite, object-oriented complexity
CK Metrics is a suite of six object-oriented design metrics introduced by Chidamber and Kemerer in 1994 to measure class complexity, cohesion, and coupling. The metrics quantify OO design quality; high coupling and low cohesion predict defects and maintenance effort.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use CK metrics on OO codebases (Java, C++, C#) to assess design quality and identify refactoring candidates. Effective for large enterprise systems where design accumulates technical debt. Less meaningful for functional or procedural code.
Strengths & limitations
- Specific to OO design; captures coupling and cohesion better than procedural metrics
- Well-researched: empirical studies confirm correlation with defects
- Automated tooling available for Java, C++, Python; integration into IDE and CI/CD
- Actionable: high CBO or low LCOM directly suggests refactoring (extract class, reduce dependencies)
- Correlation with defects is moderate (R² ~ 0.3); other factors (developer skill) matter more
- Inheritance depth (DIT) can be legitimate (framework design); metric doesn't distinguish
- LCOM (cohesion) has multiple definitions; tools compute differently, leading to inconsistency
- Language-specific: metrics apply well to class-based OO, less so to mixins or traits
Frequently asked
What is WMC (Weighted Methods Per Class) and what's a good value?
Sum of complexity (CC) of all methods in a class. WMC > 20 suggests class is doing too much. Typical range: 5–15. Very low WMC (< 3) suggests class is too simple (micro-class); balance granularity.
What is CBO (Coupling Between Objects) and how do I reduce it?
Count of classes that call methods or use attributes of this class. High CBO (> 6) means many dependencies; changes break callers. Reduce by extracting interfaces, using dependency injection, or splitting class. Lower is better; target CBO < 5.
What is LCOM (Lack of Cohesion of Methods) and why does it matter?
Measures fraction of method pairs that share attributes. Low LCOM (close to 0) = high cohesion = methods work together. High LCOM (close to 1) = low cohesion = methods are independent = class should split. But some high-LCOM classes (utility classes with unrelated methods) are acceptable.
Should I follow metric values strictly?
No, use metrics as signals, not rules. A class with WMC=25 doing one complex task is better than WMC=10 doing unrelated tasks. Combine metrics with code review and test quality for holistic assessment.
Sources
- Chidamber, S. R., & Kemerer, C. F. (1994). A metrics suite for object-oriented design. IEEE Transactions on Software Engineering, 20(6), 476–493. DOI: 10.1109/32.295895 ↗
- Basili, V. R., Briand, L. C., & Melo, W. L. (1996). A validation of object-oriented design metrics as quality indicators. IEEE Transactions on Software Engineering, 22(10), 751–761. DOI: 10.1109/32.544352 ↗
- Lanza, M., & Marinescu, R. (2007). Object-Oriented Metrics in Practice. Springer. link ↗
How to cite this page
ScholarGate. (2026, June 3). Chidamber and Kemerer Object-Oriented Metrics. ScholarGate. https://scholargate.app/en/numerical-methods/ck-metrics
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Cyclomatic ComplexityNumerical Methods↔ compare