WEST HAVEN, Conn. — The microscope at the University of New Haven, set at 10-times magnification, shows a marijuana leaf covered with dozens of tiny bumps. It’s mold, and someone, somewhere could be smoking similarly contaminated pot and not have a clue.

Heather Miller Coyle, a forensic botanist and associate professor at the university, says all sorts of nasty things not visible to the naked eye have been found in marijuana — mold, mildew, insect parts, salmonella and E. coli, to name a few.

That’s why Coyle and her students this year began developing a process to detect contaminants in marijuana through DNA profiling and analysis.

The aim is to identify potentially harmful substances through a testing method that could make the analysis easier and quicker for labs across the country in the developing industry of marijuana quality control testing.

She will be developing a method for creating DNA profiles of biological contaminants found in marijuana, including mold, viruses, fungi and bacteria.

The profiles could then be compared with DNA profiles of organisms kept in a database by the National Center for Biotechnology Information — a division of the National Institutes of Health.

Twenty states and Washington, D.C., allow medical marijuana with a doctor’s recommendation, and Colorado and Washington state have legalized recreational pot use. Connecticut and Washington state require testing.

“If there’s no certification, … it’s like saying we don’t check our meat for mad cow disease,” Coyle said. “That’s our goal as a private university, to develop the tools to address or mediate this issue.”

Labs across the country are testing marijuana for contaminants using different methods, many of which have been around for decades and used to test other plants, including food crops, for harmful substances.

The health effects of marijuana tainted with mold, pesticides and other contaminants aren’t clear, said Mason Tvert, a Colorado-based spokesman for the Marijuana Policy Project in Washington, D.C.

“Although we have not seen significant problems with tainted marijuana in the past, we should certainly be taking steps to make sure it’s not a problem in the future,” Tvert said.