McDonald's has made a remarkable recovery over the past year following two years of falling sales, but the rebound may not be as strong as it seems. Image source: McDonald's.

You would never know McDonald's (NYSE:MCD) was still in turnaround mode if all you looked at was its sales figures or stock price, but for all the gains the restaurant operator has made, it's still missing one important ingredient from the recovery menu: customers. Without more of them, investors are not realizing the full value of their investment in the fast food king, and it could hurt the chain in the long run.

Eating the competition's lunch ... and breakfast

McDonald's third-quarter earnings report showed just how far it had come. While revenues were down 1% year over year to $6.4 billion once the effects of foreign currency movements were removed, same-store sales had improved, rising 3.5% globally and 1.3% in the U.S. That domestic comps growth may not have been as strong as markets hoped for, but considering the restaurant industry overall is sluggish and it marks the fifth straight quarter they've grown after a two-year skid, it remains a remarkable achievement.

And it's done so at the expense of the competition. Both Burger King from Restaurant Brands International (NYSE:QSR) and Wendy's (NASDAQ:WEN) had been doing appreciably better in reporting higher same-restaurant sales, but as McDonald's business turned up, it was not only able to catch up to its rivals on growth, but surpass them. However, all three now seem to be hobbled by what's happening in the industry, and McDonald's may not be doing as well as the numbers suggest.

Data source: Individual company quarterly SEC filings.

Choosing to eat at home rather than dine out

According to the industry analysts at TDn2K, the restaurant industry "limped" into the start of the fourth quarter, having experienced its third consecutive quarter of negative comp sales as third quarter comps were down 1% year over year. It concludes that if these trends continue over the remaining three months of the year, "2016 will be the worst year of sales performance since 2009 when the economy was coming out of the recession."

Gloomy, yes, but with a ray of hope for McDonald's, because -- in line with the results the burger chain has reported -- the quick-serve sector has been  one of only two niches (the other being upscale dining) to consistently enjoy positive comp sales each quarter since the third quarter of 2015. And the segment has gained market share over the first six months of the year.

Yet there remains a problem. Over the past eight years, restaurant comp traffic has declined 13.3%, meaning restaurants are bringing fewer customers in the door. Whatever advances in same-restaurant sales they've made have came largely as a result of price increases or product mix, meaning when customers do dine in a restaurant, their average check is higher. Essentially, chains are seeing fewer customers, but they're eating more food, or more expensive items.

Be our guest

It's not so different at McDonald's, where Bloomberg reports it obtained an internal memo outlining how the fast-food chain may see its fourth straight year of lower customer traffic, pointing out, "Growing guest counts is our main challenge."

Data source: McDonald's quarterly SEC filings.

The burger chain looked like it had finally turned the corner this year with guest counts rising nearly 2% in the first quarter and up 3% in the first half of 2016. But in the third quarter, things apparently took a turn for the worse, as guest counts are now down 0.1% year to date, and the memo's tenor suggests it may be a tough fourth quarter too, which could lead to another year of fewer customers overall eating at its restaurants.

The decline may also foreshadow a waning of the impact of McDonald's all-day breakfast menu on its results. For years, customers clamored for the option to eat a McMuffin at any time of the day, but for logistical and expense reasons -- a crowded grill top and new equipment to handle the added items -- had kept McDonald's from offering it. But late last year it finally relented, and the change in policy seems to have been the key to the quick-serve chain's turnaround.

Along with the McPick 2 bundled meal promotion, and more recently its decision to offer the Big Mac sandwich in two more sizes, a smaller version and a more meatier one, McDonald's is finally giving customers more of what they want.

Still not focused

However, the company might not be able to escape the larger industry and economic dynamics that are weighing on consumer spending. The growth of the both the quick-serve and upscale dining segments suggests the needs of the haves and the have-nots are being met, but the large middle class and middle dining categories are feeling the pinch.

If McDonald's starts paying more attention to the value end of its menu instead of continuing its pursuit of millennial consumers with fancy restaurant upgrades, table service, and menu items like kale bowls that really don't match up with its core customers' wants, it may just truly turn around its business by attracting more people to eat in its restaurants

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.