Chipotle Mexican Grill (NYSE: CMG) might have to lay off the guacamole a little bit. Although its second-quarter profit rose, the figure missed analysts' expectations. Rising food costs and legal fees took a bite out of Chipotle's burrito. Should investors pass on this spicy stock?

Second-quarter net income increased 9%, to $50.7 million, or $1.59 per share. More hearteningly, Chipotle's second-quarter sales surged 22.4%, to $571.6 million, and same-store sales skyrocketed by 10%.

Unfortunately, the high price of foodstuffs forced Chipotle to skimp on the prices. Its restaurant-level operating margin plunged 110 basis points to 25.8%.

As a result, Chipotle missed analysts' estimates by $0.09 per share. Legal expenses related to a federal probe into the company's hiring of illegal immigrants also dragged down Chipotle's bottom line.

As far as other drags go, rising food prices and a difficult consumer climate will hurt plenty of restaurants besides Chipotle. For example, higher beef costs this year could seriously squeeze weakened stocks like Ruth's Hospitality (Nasdaq: RUTH). I wouldn't want to touch middle-of-the-road, uninspiring restaurant companies like Ruby Tuesday (NYSE: RT) in this environment, either. What about Wendy's (NYSE: WEN), which has been suffering at the hands of stronger competition like McDonald's (NYSE: MCD) and recently had to shed the Arby's part of its business? I'll pass.

In short, investors should cut Chipotle a break for its profit miss, given its robust sales and comps figures. Customer traffic isn't Chipotle's problem, even though fewer people have the disposable cash to eat out. That says a lot.

Still, potential investors craving a bite of Chipotle shares probably wish the stock had sold off far more significantly than it has today. After all, it would be nice to get this high-quality stock at a cheaper price than a whopping 54 times earnings.

Alyce Lomax does not own shares of any of the companies mentioned. The Motley Fool owns shares of Chipotle. Motley Fool newsletter services have recommended buying shares of McDonald's and Chipotle, and creating a iron condor position in Chipotle. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.