The second quarter was an excellent one for the oil industry. The price of a barrel of crude in the U.S. surged 16% to close above $74, which is the highest level since late 2014. Several factors drove oil higher during the quarter, which also ignited oil stocks.

While that rising tide lifted the entire sector, five oil stocks rallied a jaw-dropping 55% or more for the quarter. Here's a look at those big winners, and at whether any have fuel left in the tank to keep rising.

Analysts like what they see here

Whiting Petroleum (WLL) bounded upward more than 55% for the quarter, fueled by rising crude prices and its strong first-quarter results. After struggling to scrape by on lower oil prices, Whiting's cash flow has surged this year, providing it enough money to fund its drilling program with more than $100 million to spare during the first quarter.

With oil only improving in the year's second quarter, Whiting's financial results should follow suit, which could provide a further lift to the stock. That leads many analysts to believe shares still have ample upside from here. Several recently boosted their price targets, ranging from $60 to $71 a share -- all of which are above Whiting's closing price for the quarter of $53 a share.

Rows of oil pumps under a twilight sky

Image source: Getty Images.

Maybe a bit too hot to handle

Oasis Petroleum (OAS) also enjoyed an excellent quarter, rallying more than 61%. Not only did the company benefit from higher oil prices and expectation-beating first-quarter results, but it also sold some noncore assets, which provides it with cash to pay down more debt.

While higher oil prices and the balance-sheet improvement bode well for Oasis' future, analysts seem concerned that shares have run up a bit too far, too fast. Jefferies cautioned that the company's valuation seemed stretched after its big run-up, which is why it downgraded the stock to "hold" and set a $14 price target, slightly above the $13 a share where Whiting closed the quarter.

No one saw this one coming

Chesapeake Energy (CHKA.Q) was on fire last quarter, rocketing by nearly 75%, including surging 50% in the month of May alone. Several factors drove that big run-up, including higher oil prices, strong first-quarter results, and a bit of short covering.

Chesapeake's red-hot quarter defied analysts' expectations, as several had it rated a sell. UBS, for example, slapped it with a sell rating in March and a $2.80 price target; Citi downgraded it from neutral to sell in early April, and cut its price target from $5 to $2 a share. The stock, on the other hand, closed the quarter above $5 a share, which is well beyond where most analysts think it should trade.

There might still be some upside here

Carrizo Oil & Gas (CRZO) also rallied about 75% last quarter. The shale driller benefited from the uptick in crude prices, strong first-quarter results, and news that an activist investor increased its stake in the company to force changes such as selling assets or finding a merger partner. However, with shares surging in anticipation of a deal, the activist chose to cash in its chips and walk away toward the end of the quarter, after failing to convince the company to shift its strategy.

While that leaves Carrizo with one less catalyst on the horizon, shares ended the quarter at around $28 each, which was a bit below the low to mid-$30s that several analysts think they're worth.

A group of oil pumps with the sun setting

Image source: Getty Images.

What a run

The biggest winner last quarter was California Resources (CRC), which rocketed an eye-popping 162%. Fueling the company's rally were higher oil prices, a needle-moving acquisition, and the announcement of a surprise profit for the first quarter.

With that rally, shares are now up 380% over the past year, because investors no longer fear that the company's debt-laden balance sheet will drive it into bankruptcy. That has the stock trading well above where most analysts believe it should. But that doesn't mean shares can't keep heading higher, as California Resources uses its oil-fueled cash flows to begin chipping away at its massive debt load.

The higher the risk, the higher the potential reward

The reason all these oil stocks exploded to the upside last quarter is that they all had issues weighing them down heading into the period, which made them highly risky. However, those fears melted away as oil prices continued their scorching run. If oil keeps going higher -- which could happen -- these oil stocks might have further to run, especially those where analysts still see ample upside.

Yet if crude cools down, these stocks will likely be among the first to feel the chill: They still have above-average risk profiles, due to elevated debt levels and other lingering issues. In my opinion, the risk outweighs the potential reward.