Closed. This question is . This question is opinion-based . It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago. Improve this question

This code snippet is from a teammate of mine, his title is "Full Stack Developer". He mostly writes PHP. I found this code at the end of a .php file and asked him to move it to a separate .js file for testability, maintainability... just some best practices.

He denied, he actually said this code is "extremely simple" and refactoring just makes it more complicated without any benefits. He talked about KISS, about performance...