Twitter's (NYSE:TWTR) returning CEO Jack Dorsey recently announced that the company will cut up to 336 jobs, or 8% of its workforce, to streamline its business. Prior to the layoffs, Twitter had over 4,100 employees -- more than double the 2,000 employees it had in the second quarter of 2013. Since then, Twitter's monthly active users grew by less than 50%.

Back in August, Dorsey restructured Twitter's product team after new marketing initiatives failed to take off. Now it seems like Twitter's massive engineering team, which accounts for about half its workforce, is next.

Image source: Pixabay.

Twitter stock slid after initial reports about job cuts from Re/code and the New York Times surfaced, but bounced back after the layoffs were confirmed. In my opinion, the layoffs are long overdue and a positive development for the company rather than a negative one. Let's discuss why Dorsey should certainly trim Twitter's workforce as soon as possible.

How much do Twitter's employees earn?
Twitter's software engineers earn an average base salary of about $127,500, according to Glassdoor. With cash and stock bonuses included, the total rises to $143,000 -- 41% higher than the national average. Senior software engineers reportedly earn a base salary of $153,000, which climbs to a whopping $253,000 after cash and stock bonuses. That's 43% higher than the national average.

Twitter also richly compensates its top executives. Last year, Alex Roetter, Twitter's Senior VP or Engineering, earned over $19 million. About $18.8 million of that total came from stock-based compensation. Kevin Weil, Senior VP of Product, earned $13 million, with $12.7 million in stock-based compensation. CFO Anthony Noto earned $72.8 million, with $72.6 million in stock bonuses.

Considering that Twitter's stock has cratered 55% since the beginning of 2014, it's tough to see how those salaries were justified. Twitter's year-over-year monthly active user growth also dropped to 15% last quarter, its slowest growth since its IPO, indicating that new products weren't bringing in fresh users.

How does that hurt investors?
Overpaying employees with stock-based compensation hurts Twitter's bottom line. In the first six months of fiscal 2015, Twitter paid $358 million in stock-based compensation, or 38% of its revenue, to its employees -- up from $285 million a year earlier.

That huge expense, which was mainly paid to its R&D (engineering and product) employees, caused Twitter to report a GAAP net loss of $299 million during those six months, down from a loss of $277 million a year earlier. If Twitter had reduced its workforce or scaled back stock-based compensation, that loss might have narrowed. If Twitter starts laying off employees, its EBITDA margin of 24% in the first and second quarters -- which Citi analysts note is "well below" its industry peers -- could improve.

Facebook (NASDAQ:FB), by comparison, only paid 19% of its revenue as stock-based compensation in the first half of fiscal 2015. Unlike Twitter, Facebook is profitable on a GAAP basis.

More shares, higher valuations
Like many younger tech companies, Twitter relies heavily on stock-based compensation because its cash flow isn't strong enough to support big cash payments. Twitter currently has a trailing-12-month free cash flow of negative $128 million.

Since its IPO, Twitter's number of outstanding shares have risen 24%. During that same period, the number of Facebook shares rose 15%. By issuing more shares, Twitter's stock gets more diluted and "expensive" on a fundamental basis. Twitter currently trades at 12 times sales, compared to the average P/S of 7 for the Internet information providers industry.

A step in the right direction
In a previous article, I discussed the key challenges for Dorsey as Twitter's CEO -- balancing his responsibilities at Square, ensuring that Project Lightning works, and making Twitter more accessible to mainstream users. If Dorsey fails to accomplish those goals, then investors should consider selling the stock.

But reducing its workforce by 8% is a step in the right direction. The company's workforce has grown twice as fast as its user base, its engineers' salaries are well above the national average, and its stock-based compensation is weighing down its bottom line. Laying off employees to streamline the company is a tough but wise decision -- and it shows that Dorsey is serious about turning around the company he co-founded.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.