The object-oriented programming is widely adopted in recent software developments. The development of a well-designed software system is needed that reduces software maintenance costs. On the other hand, the internal structure of the software system is deteriorating due to prolong maintenance operations. In such cases, restructuring is one of the strategies to strengthen the system’s overall internal structure without changing its external behavior. Another restructuring strategy is to use refactoring on the current system. Code refactoring is an effective approach to software development to improve the internal structure of the program. Through refactoring, the quality of the program can be enhanced by maintenance and improvement in reliability. Code refactoring is done without any modification in its features. Cohesion is used to assess a software system’s design quality and is the main pillar of object-oriented software development in good software design. Using software metrics, the quality of object-oriented classes that require code refactoring is assessed. This work proposes the need for refactoring and focuses on exploring how to use object-oriented metrics as guidance where code refactoring may be used. We present object-oriented software metric, i.e., cohesion metric and analyzes the need of metric for restructuring. © 2021, The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.