This is the main question BP faces after its big earnings beat

BP Oil rig
Sean Gardner | Reuters
BP Oil rig

BP's shares rose more than 5 percent Tuesday after reporting better-than-expected first-quarter profits, but whether the company can post another quarter like that is uncertain.

Guy Baber, an analyst at Piper Jaffray, told CNBC that BP's earnings beat stemmed partly from cost controls, as well as outperformance across upstream, downstream and corporate segments.

"The question becomes, can they maintain this performance moving forward," he said. "Hopefully, we're going to see ... the same things we saw in 1Q."

BP posted an 80 percent year-on-year fall in core earnings for the first quarter, when oil prices touched a near 13-year low, but the result was better than analysts had expected.

BP's quarterly underlying replacement cost profit, the company's definition of net income, was $532 million in the first three months of the year, compared with a forecast loss of $140 million in analyst consensus figures provided by BP.

Chevron and ExxonMobil are scheduled to report quarterly results Friday before the bell, and Baber said he'd be looking for evidence that oil companies were adjusting costs to be more competitive.

"The bottom line is, their costs are way too high relative to where oil prices are and where the forward curve is," he said.

U.S. oil futures for June delivery jumped 3 percent Tuesday, lifting Chevron and Exxon shares.

—Reuters contributed to this report.

Disclosure: Piper is a market maker for BP.