The Knicks and Rangers aren’t the only franchises at Madison Square Garden not playing up to their potential, one Wall Street investor said Thursday.

The Madison Square Garden Co. itself is underperforming — and James Dolan should take decisive action to bring full value to shareholders, according to Samantha Greenberg of the Margate Capital hedge fund.

Greenberg, speaking at the hedge fund industry’s Robin Hood Investors Conference, said Dolan, chairman and controlling shareholder of MSG Co., should, among other moves, consider spinning off the Garden’s sports teams.

Such a move could spark a 25 percent rise in MSG’s share price, Greenberg said.

The Robin Hood conference is closed to the media, but The Post obtained a copy of Greenberg’s presentation.

A separation “would be very consistent with Dolan’s history of using spinoffs to unlock value,” Greenberg said.

MSG was spun off from Dolan-controlled Cablevision in 2010. AMC Networks was spun off from Cablevision a year later.

MSG’s remaining businesses, including the arena, Radio City Music Hall and other assets, would get more credit in the stock market for their expansion plans, she said.

Greenberg’s other suggestions for getting MSG’s stock to full value include:

Doing a large-scale buyback, which could add 15 percent to the stock price

Monetizing MSG’s air rights, which could add 16 percent to the stock

Selling a minority stake in the Knicks to foreign buyers, which could boost the stock by 20 percent — while building its international following.

A less likely — but greater value-enhancing proposition — would be for Dolan to lead a buyout of MSG, in which case shareholders could see a 40 percent premium.

Two years have passed since MSG was spun off from its parent, meaning Dolan is no longer prevented from buying out the company under MSG’s tax disaffiliation agreement.

MSG shares, which were flat most of the day, ticked up as Greenberg spoke, ending Thursday up 2.4 percent, at $214.92. Shares are up 25 percent for the year — but are still undervalued by as much as 38 percent, Greenberg said.

MSG declined comment.