Based on data from S&P Global Market Intelligence, shares of Best Buy (BBY 0.35%) gained 16% in February and have recovered over 30% from their recent lows. The company is operating in a remarkably challenging environment, and competition from online retail powerhouse Amazon (AMZN -2.48%) is an ongoing risk.

Tough time to be an electronics retailer
The online retail revolution is here to stay: Consumers around the world are increasingly going online to buy all kinds of products and services, and this trend is particularly important in electronics. Amazon is a major driver of this consumer shift and the biggest beneficiary behind the e-commerce boom -- the company is truly firing on all cylinders. According to financial reports for the fourth quarter of 2015, Amazon reported an impressive increase of 28% in electronics and general merchandise sales during the quarter, reaching $17.3 billion.

Best Buy is having a tough time competing against the e-commerce leader, and revenue remains under heavy pressure. The holiday period is particularly important for retailers, and Best Buy unfortunately registered a 4% decline in total sales for the quarter ended Jan. 30, 2016, while global comparable sales declined 1.7% year-over-year.

Domestic revenue was $12.5 billion during the quarter, a decline of 1.5%. This decrease was primarily driven by a comparable-sales decline of 1.8% and the loss of revenue from 13 large format and 17 small format Best Buy Mobile store closures. 

The good news
Management is aggressively cutting costs and keeping operations as lean as possible. This is driving gains to profit margins. In spite of falling revenue, Best Buy's gross profit margin increased from 21.3% to 21.7% of sales. The company is also reducing shares outstanding via buybacks, allowing Best Buy to deliver $1.53 in adjusted earnings per share during the quarter, a year-over-year increase of 3%.

Best Buy announced a big boost to its capital distribution program on Feb. 25, one of the main reasons why the stock is currently rebounding. Best Buy raised regular dividends by 22% to $0.28 per share, and it also implemented a special dividend of $0.45 per share. Additionally, Best Buy announced a new $1 billion stock buyback program over the next two years. 

It's encouraging to see that management is running a tight ship and keeping costs at bay to protect shareholder profitability in the face of declining revenue. On the other hand, the real game changer for investors in Best Buy would be sustained sales growth, so revenue is the crucial variable to watch in the coming quarters.