Whole Foods Market (WFM)  reported second-quarter results that surprisingly weren't so bad.

After Wednesday's market close, Whole Foods reported earnings of 37 cents a share on revenue of $3.74 billion for the twelve weeks ending April 9, almost exactly in line with the earnings of 37 cents a share on revenue of $3.73 billion analysts surveyed at Factset expected.

The organic grocery store retailer posted a same-store sales decline of 2.8 percent, an improvement from Wall Street's 3 percent prediction. In addition, Whole Foods nominated five new board members and appointed Keith Manbeck as its new CFO. The company also appointed Gabrielle Sulzberger to board chair, replacing long-time Chairman John Elstrott.

"We understand that we need to do much more and faster," Whole Foods Founder and CEO John Mackey said on a company earnings call this evening. "Our competitors are not standing still."

One of the ways the company plans to rival its competitors like Kroger (KR - Get Report) is by re-investing in price.

Whole Foods produce section.
Whole Foods produce section.

Shares of Whole Foods climbed 3.4 percent to $37.50 in pre-market trading on Wednesday.

READ MORE: Here's Why Whole Foods May Never Be Fixed

Meanwhile, the company announced new strategic initiatives aimed at driving a 2 percent same-store sales growth, total revenue of $18 billion and an EBITDA margin greater than 9.5 percent by 2020. The plans are also estimated to realize $300 million in additional cost savings.

For the full 2017 year, Whole Foods predicts it will generate earnings of 14 cents a share and see a 2.5 percent slip in comparable store sales. By the end of 2018, the company aims to return to positive same-store sales growth.

For all the good that the company is doing -- boosting its dividend, shaking up the board with quality leaders and cutting costs -- the fact that it can't generate positive same-store sales is disappointing, TheStreet's Jim Cramer, manager of the Action Alerts PLUS portfolio, said on CNBC's "Mad Dash" segment Thursday. 

The comps are "just awful" and it will make activist investors in the name -- like Jana Partners -- push even harder for change, he added.

There seems to be a belief by large shareholders that a takeover is still possible with Whole Foods. They want management to engage with buyers in these discussions. Frankly, Whole Foods' sales per square foot are amazing and that's attractive to buyers, Cramer reasoned. 

While same-store sales have been negative, Whole Foods generates a lot of cash and could see a boost in results with the accelerated rollout of its affinity program. It might not be the best fit for Amazon (AMZN - Get Report) , but a company like Kroger may want to take a look at it, he explained. 

The truth is, Whole Foods should have brought in Salesforce (CRM - Get Report) a long time ago to determine what its customers really wanted. But despite its flaws, Whole Foods stock could be a buy, as a takeover offer could emerge and management looks to improve its business, Cramer concluded. 

Activist investor Jana Partners, which has been pushing Whole Foods to sell itself or overhaul its board of directors to help improve the company's share price and comparable store sales, will likely be kept at bay for now.

Over on Real Money Jim Cramer give advice to investors looking at how to play the Trump Trade. Get his insights or analysis with a free trial subscription to Real Money.

Read More Trending Articles:

At the time of publication, Cramer's Action Alerts PLUS had no position in any companies mentioned.