Shares of Clorox (CLX) are rallying Wednesday after the company beat on earnings per share and revenue expectations. This was a "great quarter," according to TheStreet's Jim Cramer, who spoke on CNBC's "Stop Trading" segment.

Sales climbed 4.2% to $1.5 billion in the quarter, while margins increased by 50 basis points to 44.9% in the quarter. Those are Clorox's best margins in years, as sales in each segment increased year over year. Surprisingly, though, shares are still up despite a slight clip in full-year guidance for both sales and earnings.

Interestingly enough, CEO Benno Dorer, who is a "genius," was previously with Procter & Gamble (PG) for 14 years and passed over as CEO, Cramer pointed out. Now he comes to Clorox and is doing a magnificent job.

He "quietly built one of the greatest consumer-product stories," Cramer added. Dorer is great at using the internet to boost sales, something Cramer correctly pointed out more than a year ago.

However, sailing would be rough if not for prior CEO Don Knauss. In September 2014, he announced the company would cease operations in Venezuela and later announced that Dorer will be the new CEO going forward. This move proved extremely beneficial and many other U.S. companies wished they had done the same. At first, some investors thought of all the lost market share, but in hindsight it was one of the company's best moves.

They bit the bullet and it was worth it, Cramer concluded.

Clorox stock couldn't hold its early gains, closing up just 1.11% to $128.02 Wednesday. 

More of What's Trending on TheStreet:

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

More from Stocks

Jim Cramer Likes Secular Growers

Jim Cramer Likes Secular Growers

In Case You Missed it: What Is Eddie Lampert Doing With Sears?

In Case You Missed it: What Is Eddie Lampert Doing With Sears?

Power Up Your Portfolio With This High-Yield Dividend Aristocrat

Power Up Your Portfolio With This High-Yield Dividend Aristocrat

3 Stocks You Don't Know Could Boost your Portfolio Hugely

3 Stocks You Don't Know Could Boost your Portfolio Hugely

How to Handle Market Volatility According to This Financial Adviser

How to Handle Market Volatility According to This Financial Adviser