Investors chowed down on shares of Grubhub (GRUB) - Get Report , sending the stock price of the online takeout service higher Friday after a big upgrade by an industry analyst.

Grubhub's stock price jumped 4.81% to $40.35 a share after Barclays' analyst Deepak Mathivanan boosted his rating on the company's stock two notches to overweight.

Still, the Barclays' analyst was far from glowing in his research note on Grubhub, either.

Previously a bear on Grubhub, Mathivanan made clear his decision to offer a strong buy rating on the stock is based on the online takeout company's position as a "dominant brand" and its potential for growth, not the decisions made by the company's management, which he criticized, according to a Bloomberg story on the Barclays research note.

Grubhub is worth "a lot more than current valuation under the right strategy in a rational market," the Barclays' analyst wrote, blaming mismanagement for driving the company's stock price down 75% to two-year lows.

Mathivanan would like to see Grubhub scale back its spending on marketing, especially on what he calls "unproven strategies," while also exploring a merger with another top player in the hyper-competitive online restaurant delivery sector.

The Barclays' analyst contends Grubhub has gained little from the additional $100 million spent on marketing over the past year, and warns the online takeout service is now considering whether to spend an additional $150 million.

"We don't believe these programs are likely to help achieve sustainable growth in this intense competitive environment," Mathivanan wrote.

Meanwhile, finding the right merger partner could pay off handsomely for Grubhub and its investors, with the potential to boost the company's stock price "well north for $50 a share," which would represent a 25% premium over its current trading price, according to the Barclays' analyst/