A recent experiment performed by S. Afshar [first reported by M. Chown, New Sci. 183:30, 2004] is analyzed. It was claimed that this experiment could be interpreted as a demonstration of a violation of the principle of complementarity in quantum mechanics. Instead, it is shown here that it can be understood in terms of classical wave optics and the standard interpretation of quantum mechanics. Its performance is quantified and it is concluded that the experiment is suboptimal in the sense that it does not fully exhaust the limits imposed by quantum mechanics.