When McDonald's debuted the slogan "You Deserve a Break Today" in 1971, it was tacked onto a commercial that barely mentioned food. As a team of singing workers cavorted with mops and brooms, they extolled a quality you don't ordinarily see mentioned in an ad for a fast-food chain: "At McDonald's, it's clean!"

McDonald's founder Ray Kroc was, by all accounts, obsessed with cleanliness. Chains such as Burger King, which followed in Kroc's wake, took up the same principles: Quality, Service, Cleanliness, and Value.

Levels of cleanliness - a key part of food safety - vary widely at the individual franchise level, according to city restaurant inspection reports.

McDonald's, the biggest of the burger behemoths, has about 75 outlets in Philadelphia. Burger King trails with about 20. Accordingly, McDonald's has had more opportunities to get things right - and wrong.

During 2014, McDonald's restaurants in the city were cited with an average of 2.3 violations considered food-borne illness risk factors. That was exactly average for the 5,000 or so eat-in restaurants in the city. Burger Kings were cited with an average of just 0.52.

Records at the two chains have seesawed from year to year: In 2013, Burger King franchises were cited 2.1 times, on average, compared with McDonald's 1.8. The year before, Burger Kings averaged 1.0 violation vs. McDonald's 1.6.

Neither company would comment on specifics of food-safety practices.

"McDonald's and our independent owner-operators" - representing 90 percent of the chain's restaurants - "share a commitment to food safety and the well-being of our customers and respective employees," spokeswoman Terri Hickey said in an e-mail, adding that "health department inspections are taken seriously, and when an issue is brought to light, action is taken to address it."

Burger King had a similar response.

Food-borne illness risk factors, the more serious of two categories of violations used by inspectors here and in most other jurisdictions, are practices or procedures that research has linked to an increased likelihood of disease transmission. There are hundreds of possibilities, from a sewage leak to employees' not washing their hands vigorously enough.

Most fast-food franchises do well on inspections. Several have records that any restaurateur would envy. The McDonald's at 2851 Grays Ferry Ave. hasn't been cited with a food-borne illness risk factor violation in more than two years. The Burger King at 2400 Castor Ave. has had only one since early 2011.

"In terms of fast food, there's not much they can do to screw it up," said Don Schaffner, a professor of microbiology at Rutgers University and president of the International Association for Food Protection. The complex processes that can trip up exotic places that make everything from scratch, for example, are missing from these eateries, which is part of how they produce food fast.

"Those restaurants do a pretty good job of engineering out the risk factors," said Schaffner, who also sits on McDonald's Food Safety Advisory Council. "I'd be more leery going to a fancy white-tablecloth place than a fast-food restaurant."

Partly, food-safety experts say, that is because big, publicly traded corporations - from McDonald's to ConAgra - are well aware of the damage a food-poisoning scandal can do to their brands, and they put a priority on preventing it.

Inspectors from the Philadelphia Department of Public Health attempt to visit every restaurant once a year. Inspections are a snapshot in time, with limited ability to prevent food-borne illness. Much of the job involves educating food workers, which health officials say is more effective than policing or stiff fines.

Establishments with problem histories also are visited more often, however; the city says a single violation for a food-borne illness risk factor usually calls for a repeat inspection.

"If you're top-notch, you're not going to have more than one risk factor violation per inspection," said Janice Buchanon, a former food inspector and now an executive with the Steritech Group Inc., a Charlotte, N.C., company that consults on food safety with supermarkets, restaurant chains, hotels, and food-processing facilities. Burger King, Buchanon said, is one of the company's clients.

In Philadelphia, a handful of McDonald's restaurants collected more than 10 food-borne illness risk factor violations apiece in 2014. The McDonald's at 6470 Torresdale Ave., in the city's Tacony section, racked up the greatest number: 19 in four visits by inspectors. On Jan. 8, 2014, for example, an inspector listed six food-borne illness risk factor violations, including insufficiently hot water in hand-washing sinks, and food held at temperatures not hot enough to prevent bacterial growth. There were an additional 11 violations in the less-serious category, such as dirty restrooms, for a total of 17 violations on that one visit.

A follow-up inspection Feb. 12 turned up eight violations in the more serious category, a few of them repeats, such as improper hand washing, sanitizing solution that was too weak, and a lack of knowledge about food-borne illnesses on the part of the person in charge - a potentially serious issue, because the most common disease picked up in restaurants is norovirus, which is spread by sick employees. Including less serious violations - dirty restrooms again - the total that time was 19.

A March 13 "compliance check" - not a full inspection - in response to a plumbing complaint found the issue had been fixed. But another inspection, on Oct. 16, found five food-borne illness risk-factor violations, plus four less serious problems, for a grand total of 44 for the year.

A follow-up Jan. 23 was starkly different: no violations in the top category and three minor ones (one of which was a lack of menu board nutrition labeling, which city ordinance requires, but which is not being enforced due to a conflict with new federal regulations).

Mark Grenon, co-owner of the Torresdale Avenue McDonald's, said the franchise got another clean inspection (not yet posted by the city, which holds reports for 30 days) on Feb. 23.

"This restaurant has passed the last two inspections and we are committed to operating a safe and clean experience for customers," Grenon said in an email.

"I have also revisited cleaning and health-safety procedures with my employees," he wrote, "to ensure compliance with health department regulations, and safeguard against something like this happening again."

His efforts seem to have paid off.

Find inspection reports for all McDonald's and Burger Kings, and any other city restaurants: