Shares of computer peripherals maker Logitech (NASDAQ:LOGI) stumbled badly in the wake of the firm's April 18 earnings report, falling 8% in a day. Since then, however, the shares have followed a generally rising market back north to cut losses in half.

Judging from reports in the mainstream media, it seems most of the fear arose from news of weaker-than-expected sales now that Microsoft (NASDAQ:MSFT) is gunning for the company in the webcam market. But if that's the case, I have to say that all the hand-wringing that went on in the hours immediately following the earnings announcement was a bit overdone. (That's called understatement.) In the big picture, Logitech had a simply fabulous fiscal 2007. Ignoring the Q4 picture and the webcam brouhaha as inherently short-sighted, let's take a look at Logitech's fiscal year.

In fiscal 2007, the company grew its sales 15% versus fiscal 2006 numbers. Profits soared nearly twice as high, up 27%. Logically (pun intended) therefore, you know that Logitech must have grown its margins on sales in order to produce so much greater profits. That logic is proven correct by the numbers: Gross margins rose 230 basis points to 34.3%. Operating margins just 10 basis points to 11.2% -- which compares favorably to Nam Tai's (NYSE:NTE) 5.5% and Plantronics' (NYSE:PLT) 9.3%, and blows away Creative Technologies' (NASDAQ:CREAF) negative margin. And the net margin was up a good 100 basis points to 11.1%.

If there's a reason to be pessimistic about Logitech today, I think we'll find it in the paragraph above, rather than in some blip in the webcam sales charts. Notice how margin gains near the top of the income statement all but evaporated by the time we reached operating profitability? That's a consequence of rapidly rising operating costs. Marketing costs outpaced sales growth 23% to 15% -- suggesting Logitech is getting diminishing returns from its marketing efforts. R&D growth, which also reached 23%, doesn't concern me (to the contrary, I'm pleased to see the firm investing in its future.) Most alarming, though, was the rise in general and administrative costs, which soared entirely out of control, up 49% in comparison to fiscal 2006.

In sum, Logitech's failure to control its costs ate up almost its entire gross margin improvement. The only reason it wound up more profitable (by net margin) this year than last was because its income from interest and "other" sources more than doubled, while its tax rate fell 10%. That, to me, is the biggest threat to Logitech's future. Not a bunch of webcams.

What were we expecting from Logitech last quarter, and what did it produce? Find out in:

Fool contributor Rich Smith does not own shares of any company named above. The Motley Fool has a disclosure policy that is ready for its close-up.