Walmart Stores (WMT) - Get Report  is flexing its muscles a bit. 

Before Thursday's market open, the world's largest retailer reported first-quarter earnings of $1 a share on revenue of $118.8 billion. Wall Street expected earnings of 96 cents a share on sales of $117.8 billion. 

The company's U.S. same-store sales rose 1.4%, held back by consumers delaying spending due to late tax refunds. 

Shares gained 2.6% to $76.81 in early Thursday trading and they deserve to be, TheStreet's Jim Cramer, manager of the Action Alerts PLUS portfolio, said on CNBC's "Mad Dash" segment. After all, the company beat earnings, revenue and same-store sales estimates.

There's no denying the struggles in the retail sector, particularly given the rise of e-commerce. However, Walmart is different. The company is in better position to fight back than its bricks-and-mortar peers because it has an excellent strategy, a balance sheet to envy and long-term shareholders. The Walton family owns roughly 50% of the stock.

Walmart seems to be the only retailer not being completely disrupted by the shift of people buying more items online, as its peers including J.C. Penney (JCP) - Get Report , Macy's (M) - Get Report and Kohl's (KSS) - Get Report posted massive declines for the first quarters. Walmart has been helped by efforts to lower prices in groceries, which has brought people to the stores. Traffic to Walmart's U.S. stores rose 1.5% in the quarter, for example.

Image placeholder title

Meanwhile, some of Walmart's recent initiatives to try to crush competitor Amazon (AMZN) - Get Report  include adding pickup discounts and free two-day shipping to its services, and testing in-store technology that would create an endless toy aisle, among other features. So far, the early efforts look to be working. 

Plus, after Walmart bought e-commerce startup Jet.com for $3.3 billion in August, its founder, and now head of Walmart's U.S. e-commerce division, Marc Lore has been buying up other notable online companies like women's vintage-inspired retailer Modcloth.com for $150 million and outdoor recreational retailer Moosejaw for $50 million.

The purchase of Jet has proven to be successful thus far. In the first quarter, Walmart saw its online sales climb 63%.

This is setting up to be a two-horse race between Walmart and Amazon, Cramer reasoned. But where does Walmart have the edge? Surprisingly, in it's bricks-and-mortar business. The company can beat Amazon on food, particularly on fresh food, as Jeff Bezos' digital beast doesn't have any stores. 

Read more of TheStreet's top stories: