Image source: Shake Shack.

Shake Shack (SHAK 0.34%) learned today that investors have every bit as discerning taste for stocks as the upscale burger chain's customers have in food.

After Shake Shack reported on Wednesday that its sales growth decelerated in the second quarter, its shares plummeted, falling more than 10% between the regular and after-hours trading sessions.

Investor angst was focused on Shake Shack's same-store sales, which compare the year-over-year change in sales at locations open for 24 months or longer. The figure climbed 4.5% last quarter.

While analysts had predicted a 4.8% rate, the bigger problem was that Shake Shack's same-store sales grew 12.9% in the year-ago period and 9.9% in the first quarter. The fear is thus that last quarter wasn't an aberration, but rather the beginning of a new growth trajectory.

There's typically nothing wrong with a nearly 5% same-store sales figure. Over the same quarter, comparable sales at McDonald's grew by 3.1%. And that was after the Big Mac maker introduced a substantial menu change in the intervening year -- its All-Day Breakfast.

But in Shake Shack's case, the expectations are higher given how young of a company it is -- it was founded only a dozen years ago. This youth is reflected in its price-to-earnings ratio of 122, which is approximately six times that of the average stock on the S&P 500. To justify the sky-high multiple on its stock, then, it has to keep up a brisk pace of growth.

SHAK Chart

SHAK data by YCharts.

On a more upbeat note, even though Shake Shack's same-store sales came up short of expectations, it nevertheless reported a 37% jump in second-quarter revenue. The increase was fueled by new store openings and comparable sales growth.

Shake Shack opened four new company-owned stores and three new stores licensed to third parties in the three months ended June 29. CEO Randy Garutti also raised the company's guidance for the remainder of the year:

"Domestically, given favorable development tailwinds in our 2016 pipeline, we have increased guidance to open 18 domestic company-operated Shacks this year. Next week we will reach a milestone of our 100th Shack opening worldwide."

Moreover, despite the decline in its share price, Shake Shack's earnings came in above the consensus forecast. It earned $3.3 million, or $0.14 per share, last quarter on revenue of $66.5 million. That beat analyst expectations on both the top and bottom lines. Wall Street had been expecting earnings of $0.13 per share on $63 million in revenue.

In short, while Shake Shack's same-store-sales figures might have left something to be desired, the company's all-around performance confirms that the future is still bright for the burger chain.