Comparative Study of Source Code Complexity in PHP Web Applications: Utilization of Commercial Code Generators and Manual Framework
Downloads
This study examined the complexity of source code generated by commercial code generators (PHPMaker and PHPRunner) versus code written manually using the Laravel framework and the open-source code generator CakePHP. Code complexity is a critical metric in software development that influences maintenance, improvement, and responsiveness to changes.
This study uses an empirical analysis approach to assess code complexity using cyclomatic and relative system complexity metrics. According to research findings, commercial code generators speed up the program writing process while producing code that is more complex than manual code. The code's high complexity may pose challenges for future maintenance and development, as well as increased cost and development time.
This study suggests a hybrid approach that combines the use of code generators for specific aspects with manual encoding of critical components. This study provides valuable guidance for software developers in managing source code complexity and ensuring effective and sustainable software development.
T. R. Awode, D. D. Olatinwo, O. Shoewu, S. O. Olatinwo, and O. O. Omitola, “Halstead Complexity Analysis of Bubble and Insertion Sorting Algorithms.” . Number, vol. 18, no. 1, 2017.
K. A. Onyango, J. Kamiri, and G. M. Muketha, “A comparative study of the lexicographical complexity of Java, Python and C languages based on program characteristics,” J. Innov. Technol. Sustain., vol. 1, no. 1, pp. 42–67, Oct. 2023.
“PHPMaker 2024 - The Best PHP Code Generator.” Accessed: Nov. 06, 2023. [Online]. Available: https://phpmaker.dev/
“PHPRunner. The best PHP code generator in the world.” Accessed: Nov. 06, 2023. [Online]. Available: https://xlinesoft.com/phprunner
C. W. Fraser, D. R. Hanson, and T. A. Proebsting, “Engineering a simple, efficient code-generator generator,” ACM Lett. Program. Lang. Syst., 2002, doi: 10.1145/151640.151642.
J. Shin and J. Nam, “A Survey of Automatic Code Generation fromNatural Language,” J. Inf. Process. Syst., vol. 17, no. 3, pp. 537–555, Jun. 2021.
R. D. Banker, G. B. Davis, and S. A. Slaughter, “Software Development Practices, Software Complexity, and Software Maintenance Performance: A Field Study,” Manag. Sci., vol. 44, no. 4, pp. 433–450, Apr. 1998, doi: 10.1287/mnsc.44.4.433.
R. Tavares Coimbra, A. Resende, and R. Terra, “A Correlation Analysis between Halstead Complexity Measures and other Software Measures,” in 2018 XLIV Latin American Computer Conference (CLEI), São Paulo, Brazil: IEEE, Oct. 2018, pp. 31–39. doi: 10.1109/CLEI.2018.00014.
“CakePHP - Build fast, grow solid | PHP Framework | Home,” CakePHP - The rapid development php framework. Accessed: Aug. 04, 2024. [Online]. Available: https://cakephp.org/
“Laravel - The PHP Framework For Web Artisans.” Accessed: Nov. 12, 2023. [Online]. Available: https://laravel.com/
M. U. khan, S. iftikhar, M. Z. Iqbal, and S. Sherin, “Empirical studies omit reporting necessary details: A systematic literature review of reporting quality in model based testing,” Comput. Stand. Interfaces, vol. 55, pp. 156–170, Jan. 2018, doi: 10.1016/j.csi.2017.08.002.
S. Agarwal, S. Godboley, and P. R. Krishna, “Cyclomatic Complexity Analysis for Smart Contract Using Control Flow Graph,” in Computing, Communication and Learning, S. K. Panda, R. R. Rout, R. C. Sadam, B. V. S. Rayanoothala, K.-C. Li, and R. Buyya, Eds., Cham: Springer Nature Switzerland, 2022, pp. 65–78. doi: 10.1007/978-3-031-21750-0_6.
A. Mashkoor, A. Egyed, R. Wille, and S. Stock, “Model-driven engineering of safety and security software systems: A systematic mapping study and future research directions,” J. Softw. Evol. Process Q2, vol. 35, no. 7, p. e2457, 2023, doi: 10.1002/smr.2457.
R. C. da C. Gonçalves and I. Azevedo, “RESTful Web Services Development With a Model-Driven Engineering Approach,” in Code Generation, Analysis Tools, and Testing for Quality, IGI Global, 2019, pp. 191–228. doi: 10.4018/978-1-5225-7455-2.ch009.
S. I. Ahmad, T. Rana, and A. Maqbool, “A Model-Driven Framework for the Development of MVC-Based (Web) Application,” Arab. J. Sci. Eng., vol. 47, no. 2, pp. 1733–1747, Feb. 2022, doi: 10.1007/s13369-021-06087-4.
“PhpMetrics, static analysis for PHP - by Jean-François Lépine.” Accessed: Nov. 06, 2023. [Online]. Available: https://phpmetrics.org/