Code Smells

Code Smells image
Code smells are warning signs in code that hint at deeper issues. Code smells aren't necessarily errors but they can make future development harder and increase the risk of bugs.

Examples of code smells could be duplicated code, large classes or long methods i.e. one function, trying to do too much, or methods that are long to understand. These examples highlight that code smells can be introduced by multiple authors from different disciplines and can exist in production code, scripts like one that produces tests data or automated tests.

Engineers can prevent fundamental design flaws, maintainability issues and scalability issues before they become more serious issues by identifying and refactoring code smells. Leaving code smells can contribute to cognitive complexity which can result in engineers spending more time reading and understanding code than contributing to it.
Warning signs in code that hint at deeper structural issues without necessarily being errors themselves. Common examples include duplicated code, overly long methods, large classes that do too much, and variables with meaningless names. 

Demi described discovering SonarQube as a tool for automatically detecting and ranking code smells by severity and impact. The term captures the idea that if code "smells," something is likely off, even if it technically runs. Code smells are often precursors to technical debt if left unaddressed.
Explore MoT
MoTaCon 2026 image
Thu, 1 Oct
A tech conference to help you navigate the ever-shifting landscape of Quality Engineering, AI, Leadership, Product, Accessibility and Security.
MoT Software Testing Essentials Certificate image
Boost your career in software testing with the MoT Software Testing Essentials Certificate. Learn essential skills, from basic testing techniques to advanced risk analysis, crafted by industry experts.
Into The Motaverse image
Into the MoTaverse is a podcast by Ministry of Testing, hosted by Rosie Sherry, exploring the people, insights, and systems shaping quality in modern software teams.
Subscribe to our newsletter