Rule Definition
Changing a class requires prior understanding, which, in turn, is more complicated for classes with many methods. Classes that are deep down in the classes hierarchy potentially inherit many methods from super-classes. Moreover, the definitions of inherited methods are not local to the class making it even harder to understand it.
Complete testing requires coverage of all execution paths. The number of possible execution paths of a class increases with the number of methods and their control flow complexity. Classes that are deep down in the classes hierarchy potentially inherit many methods from super-classes. Due to late binding, super-class methods need to be tested again in the sub-class context. This makes it potentially harder to test classes deep down in the classes (interfaces) hierarchy.
Technical or framework classes which are evolving and will not be changed often should not be concerned by this rule.
Remediation
Review the design of the Class hierarchy.
Reference
A Metrics Suite for Object Oriented Design
Chidamber, S.R. and C.F. Kemerer
IEEE Transactions on Software Engineering, 1994
Related Technologies
Visual Basic
.Net
C++
JEE
Technical Criterion
CWE-1074 - Class with Excessively Deep Inheritance
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.