Wix (WIX -0.18%) reported its second-quarter earnings earlier this month. The website-building platform beat analysts' estimates for revenue and earnings, sending the stock up in response to the news. Shares are now up almost 20% in the last month. However, the stock is still down over 50% this year, and with a market cap of only $4.1 billion, I think it is severely undervalued compared to its long-term earnings potential. 

After reporting strong earnings, Wix has shown once again why it belongs in your portfolio -- here's why you should consider buying shares. 

Solid Q2 results with FX headwinds

Wix's revenue grew 9% year over year in the second quarter to $345 million, while its bookings grew 3% to $355 million. This is a major slowdown from last year when revenue was growing over 30%. A lot of this weakness is coming from a decline in new website development, which management believes is occurring due to tough comparisons from the heart of the COVID-19 pandemic. But Wix is also feeling the effects of foreign exchange (FX) headwinds with the rising value of the U.S. dollar making its international sales less valuable, therefore hurting revenue growth. On an FX-neutral basis, revenue grew 11%, and bookings grew 7% during the quarter.

I wouldn't get too concerned with slowing revenue growth, though. Total revenue through the end of the second quarter has grown at a 21% compound annual rate since 2019, which shows the steady expansion a subscription business like Wix can achieve. And even though total revenue growth is slowing, Wix saw partner revenue increase 31% year over year to $85 million. This segment, which includes deals Wix has made with agencies and organizations like Vistaprint, has delivered tremendous results over the past few years and should be a big growth driver in the years ahead.

Management now expects revenue to grow 8% to 10% in 2022. This is below Wix's long-term growth target of 17% but not hugely concerning given the 2021 pandemic comparisons and FX dynamics.

Prudent cost-cutting measures, 2025 cash-flow targets

With growth decelerating, Wix has announced a new cost-cutting initiative that will save $150 million in expenses annually. The company still believes it can hit its 2023 to 2025 free-cash-flow targets outlined at its recent Investor Day even though revenue growth has slowed. With many new products like e-commerce tools, Wix Payments, and the ramp-up of partner revenue, Wix's free cash flow dipped into negative territory over the last few quarters. Management is guiding for free-cash-flow margin to expand from around 0% today to 10% by 2023 and then 20% by 2025 as all these new initiatives start paying off.

By 2025, Wix believes it can generate $2.5 billion in revenue and $500 million in free cash flow a year. This will require revenue growth to accelerate back closer to 20% or higher, but I think this is possible once the macroeconomic situation normalizes and partner revenue becomes a larger portion of the business. 

WIX Free Cash Flow Chart.

Data by YCharts.

The stock is still cheap

Even though Wix's market cap is now up to $4.1 billion after the stock's recent gains, it is cheap when taking the long view. If the 2025 free-cash-flow target of $500 million is achieved, the stock will be trading at a price-to-free-cash-flow ratio of only eight.

Website builders are durable businesses, and it is likely Wix will have demand for its products for many years -- if not decades -- to come. From my point of view, this means Wix deserves a premium valuation multiple. If the company can sustain its growth targets beyond 2025, shares will be much higher 10 years from now