Both revenue and earnings were short of analysts’ forecasts, and the company’s shares fell after hours.