"The vendors think they are doing a good job, when in reality they are not."

Farmers markets are all the rage. But they aren't nearly as ​pure as they claim. 

That's the bottom line of a study published Thursday by researchers at Penn State University in the journal Food Protection Trends​Vendors at Pennsylvania farmers markets regularly fail to follow procedures to prevent the spread of food borne illnesses, even when they say they do, according to the paper.  

The researchers, who went undercover for the study, found E. coli in 18 percent of the pork and 40 percent of the beef they checked. By comparison, studies of US supermarkets have found E. coli in US supermarket beef at significantly lower levels: from ​19 percent ​to ​0 percent

Nor can vegans rest easy. More than a quarter of the kale and lettuce samples surveyed tested positive for E. coli. The study did not test the levels of the potentially dangerous bacteria. 

"The vendors think they are doing a good job, when in reality they are not," Cathy Cutter, professor of food science at the Penn State College of Agricultural Sciences, said in a statement. "We are not sure why there were such discrepancies. Nevertheless, they need to do better."

When it came to "hand-washing, personal hygiene and cross contamination," vendors were found to use "insufficient or high-risk behaviors," a summary of the study said. Fewer than a quarter of vendors had disposable gloves, even though many were selling raw foods, such as meat and seafood, alongside read-to-eat varieties. 

Among the "low" number of vendors that used gloves, nearly half did so "improperly" -- for example, by handling money and food without swapping pairs -- according to the researchers. 

"These results suggest that there is a general lack of understanding among vendors about when to use disposable gloves, when to change gloves and what kinds of behaviors are unacceptable while wearing gloves," lead researcher Joshua Scheinberg said in a statement.

With an estimated 8,500 markets ​operating across the ​United States -- and bigger and fancier varieties opening all the time -- the researchers said their study confirms previous findings: There are "high-risk food-safety factors unique to farmers markets and farmers market vendors."

There's always Walmart. 

Cover image: A woman shops for produce in San Francisco, California, on March 27, 2014. (Justin Sullivan/Getty Images)