Large Class Refactoring in PHP Program to Improve Modularity Based on ISO/IEC 25023 Metrics
Code that contains code smell is difficult for software developers to understand, modify, or maintain. This study focuses on improving software quality by minimizing the code smell, which can hinder maintenance and development. Code smell with a Large Class type was selected as the primary focus because such type of code is often difficult to understand and modify. To address this issue, refactoring techniques, such as the Extract Ciass, Extract Method, and Move Method are applied in a real case. This study assesses the effectiveness of code refactoring using modularity metrics based on the ISO/IEC 25023 standard. The study was conducted on PHP code containing code smell, which were then identified, analyzed, and refactored. Case studies involved real software applications, and code quality improvements were measured by comparing metrics before and after refactoring. Results showed significant improvements in code modularity. In the Laundry case study, modularity improved by 40.58% for the MMo-1-G metric and 3.97% for the MMo-2-S metric. In the School Management System, improvements of 8.76% for MMo-1-G and 0.11% for MMo-2-S were recorded. The results demonstrate that refactoring can effectively reduce code smell and improve software quality.
Authors
- Siti Rochimah (ORCID: https://orcid.org/0000-0002-5603-749X)
- Bella Dwi Mardiana
Institutions
- Sepuluh Nopember Institute of Technology (ID)
Publication Details
- Published
- 2024-11-06
- DOI
- https://doi.org/10.1109/itis64716.2024.10845243
- Citations
- 1
- Primary Topic
- Power Systems and Technologies
- Type
- article
- Field-Weighted Citation Impact
- 0.21