McDonald's Corp. (MCD - Get Report) shares rose 4.8% to $165.88 after releasing first-quarter 2018 earnings per share and same store sales that beat consensus expectations, both in the U.S. and internationally. 

Diluted earnings per share were $1.72, up 17% from a year ago, which included 7 cents per share of extra income from the tax expense associated with the new tax law. Excluding the effect of the tax act, EPS was $1.79, up 22%. According to FactSet, McDonald's consensus for Q1 earnings per share was $1.67, up 13.9%.

Same store U.S. sales, which increased by 2.9%, matched consensus expectations, and were driven in part by a higher customer spending. International same store sales rose by 7.85%, compared with analysts' estimates of 4.5%.

Operating income was up 5%, to $2.1 billion this year, from $2 billion, and net income was up 13% to $1.3 billion from $1.2 billion. 

Revenue dipped by 9% to $5.1 billion in 2018 compared with $5.7 billion the previous year because of the company's refranchising efforts, it said in a press release.

"McDonald's helped itself to healthy uplift in both operating and net income this quarter," said managing director Neil Saunders of GlobalData Retail in a statement post-earnings release. "These uplifts came despite a continued slide in global revenue, which fell by 9.5% this quarter."

The company returned $2.5 billion to shareholders through share repurchases and dividends.

"We continued to build upon the broad-based momentum of our business, marking 11 consecutive quarters of positive comparable sales and our fifth consecutive quarter of positive guest counts," said CEO Steve Easterbrook in a press release.

Analysts polled by TheStreet prior to earnings believed that McDonanld's was heading in the right direction but has a way to go, based on some misses with new products such as the fresh-beef burger and the $1/$2/$3 menu promotion, which gives customers choices to put together a meal for $3 by selecting foods from a fixed set of offerings. In addition, like many in the industry, Easterbrook is trying to balance the challenges of rising wages for workers, customers' demand for better menu choices and razor-thin margins against the need to deliver solid returns.