Shares of Kroger (KR -0.04%) surged 10% on June 21 after the supermarket chain's first quarter numbers topped analyst estimates. Its revenue rose 3.4% annually to $37.5 billion, beating expectations by $230 million.

Excluding fuel costs, sales grew 2.3%; and excluding the recent sale of the company's convenience store unit, sales rose 2.8%. The company's identical-store sales (excluding fuel) rose 1.4%, marking its fourth straight quarter of positive identical-store sales. For the full year, Kroger expects its identical-sales growth (excluding fuel) to rise 2%-2.5%.

A shopping cart in a supermarket aisle.

Image source: Getty Images.

Its adjusted net earnings rose 14.7% to $626 million, or $0.73 per share, beating expectations by ten cents. For the full year, Kroger anticipates adjusted earnings growth of -2% to +5.4%. Analysts, on average, expect Kroger's full-year revenues to stay roughly flat and for its adjusted earnings to rise 2%.

Kroger's growth figures seem tame, but they indicate that Amazon (AMZN -1.11%) isn't quite crushing the chain with its Whole Foods acquisition yet, and that it's holding its ground against Walmart (WMT -0.32%) or Costco.

At $29, Kroger's stock trades at about 14 times this year's earnings, and it pays a forward dividend yield of 1.9%. That low valuation and decent yield make it seem like a good turnaround play, but is Kroger a safe stock to own?

Understanding the long-term headwinds

Kroger is the largest grocery chain in America by annual revenues. Albertsons, its closest direct competitor and the parent company of Safeway, repeatedly postponed its IPO due to unfavorable market conditions for stand-alone grocers.

Those unfavorable market conditions include stiff competition from superstores and warehouse retailers, Amazon's purchase of Whole Foods, and the escalating battle between Walmart, Target, and Amazon grocery delivery services. Amazon's integration of Prime -- which has over 100 million worldwide members -- into Whole Foods represents a long-term challenge for Kroger, since Amazon's exclusive discounts for Prime members could undercut its prices.

The bears often argue that Kroger's grocery business can't withstand that pricing pressure, and that it can't keep up with new delivery and pickup options. The bulls, however, believe that Kroger still has some tricks up its sleeve.

A man checks a smartphone while shopping.

Image source: Getty Images.

Understanding Kroger's turnaround plans

Kroger isn't waiting for Amazon to render it obsolete. Last year, it introduced "Restock Kroger", a three-year plan to leverage all the food purchase data it accumulates into actionable data -- including data-driven pricing, revamped product selections, and personalized communications.

That plan also includes a heavier emphasis on the company's private-label brands and organic foods. For example, its Simple Truth products don't contain 101 specific artificial ingredients, antibiotics, and GMOs, and its Simple Truth Organic products are certified by the U.S. Department of Agriculture. It also offers meal kits (which received a big boost via its acquisition of meal kit maker Home Chef) and its own sparkling water.

These products target Whole Foods' core market of health-conscious consumers. On the digital front, Kroger launched ClickList, which lets shoppers order products online and pick them up at its stores. The service charges a flat fee of $4.95 per regular order and $7.99 per expedited order. Kroger also partnered with Instacart, Shipt, and Uber for home deliveries, and its investment in Ocado will let it integrate some of the British online grocer's delivery technologies into its stores.

During last quarter's conference call, CEO Rodney McMullen said that Restock Kroger was "off to a great start," and that the effort lifted its digital sales by 66% annually during the quarter. McMullen stated that Kroger's goal was to create a "seamless environment where our customers can choose how to engage with us both in-store and online," and that it was "aggressively growing" its seamless coverage to reach "approximately 75%" of its customers.

But mind the margins...

Kroger's turnaround plans sound smart, but they could hurt its margins. Its FIFO (first in, first out) operating margin came in at 21.8% for the quarter, which matched expectations but marked a drop from 21.9% in the previous quarter and 22.1% a year ago.

Those margins will likely keep declining as the competition heats up and forces Kroger to invest more heavily in the growth of its e-commerce ecosystem, launch new delivery options, or buy and integrate smaller companies. Simply put, it could end up in the penalty box like Walmart, which expects its e-commerce investments to cause its earnings growth to slow to a crawl.

I think Kroger's scale and turnaround efforts will help it remain relevant over the long term. However, margin pressures indicate that its bottom line growth could decelerate as it challenges Amazon and Walmart. Therefore, I'd still avoid Kroger until the smoke clears.