Let's start with a demystification: WordPress is not a terrible choice for SEO by itself but if you take it and use it as is, out of the box, you won't be doing yourself any favors and could even start to encounter penalties.
Speed is one important factor to get a good ranking by search engines, and WordPress is not the fastest CMS out in the market. It does not serve assets by means of a CDN and it's based on two old-fashioned technologies, PHP and SQL, that can easily be slowed down by misuse. And lets not get started about the frequent security issues. But the most fearsome threat comes from plugins; one of WordPress' traditional strong points. Plugins are handy and powerful; WordPress would not be the same without them but a casual user may be tempted to install lots of them, even coming up with some duplicates. This can obviously result in a disaster for load speed and the risk of loading duplicate libraries (like jQuery or Bootstrap) is quite high when using a theme, since many of them load these libraries by default.
In fact, if you have a look at the HEAD tag of a WordPress theme, you will notice that it’s pretty bloated and, often, you don't need all the features that are loaded by default. Optimization is a magic word when talking about speed; clearly identify your needs (also the future ones) and get rid of all the features you don't need, since everything you load has a cost in terms of speed.
Images also play an important role in optimization; good designers always use them in exactly the size and resolution they need, but an editor without so much design experience may be tempted to upload oversized images, hoping to always get the best quality. Again, this is a problem you get with a fresh WordPress installation, since you do not have any tools for image optimization, but once you are aware of that, you can use plugins for handling image responsiveness. This is highly recommended, since oversized images will be cropped to the desired maximum size, and only the best plugins also serve optimized images for mobile devices. The combined saving action of image resizing and responsiveness will have a huge impact on speed, and this benefits SEO too.
The strength of WordPress lies in its plugins since the core doesn't have so much to offer in many fields, especially in SEO. But installing plugins without exactly knowing what they do and without any configuration may spoil all the efforts you have made for SEO. All the plugins that modify the robots.txt file may conflict with other previously set preferences, therefore disabling indexing or caching.
Caching is a technique that can greatly improve the speed of a WordPress website, and there are many plugins that do an excellent job, but if you just "install and forget" you may discover that auto-renew is disabled and you must reload to apply most of the changes. Pay attention to the plugin settings or you will surely save a lot of headaches.
Another type of plugin which is good for SEO but must be handled with care are those which automatically create links on your website. While this is generally a good practice, there are some places where such a plugin may have undesired effects. With landing and conversion pages, you want the visitor to become a customer and not end up running away from your site due to a poor experience. A properly configured site is essential to a good customer experience.
Good SEO involves a lot of work, if you want to do a serious job with WordPress a good plugin is required, and Yoast is probably the most famous. It has a wide array of useful features; most of them are free, and the premium ones are definitely worth the price if you run a large website. Yoast makes an in-depth analysis of the quality of your content. It examines the balance between short and long sentences, counts the words between subheads, checks the quality of the meta description, performs a readability test and much more. So Yoast is surely an invaluable tool for SEO in WordPress but all that glitters ain't gold, and even Yoast has its own drawbacks. It seems that the plugin is too much focused on keyword-driven SEO, which might not be the best approach today; Google's search algorithm may actually penalize the page. Despite that, Yoast delivers very good advices for page optimization but you must use your judgment to make them effective.
All of the examples above clearly show that the best way to handle SEO in WordPress is… to know a lot about SEO. One cannot just install a couple of plugins, hoping that they do all the work for us; we need to know how to configure settings that often conflict with others or that are far from optimal for our needs. We need to know the search engines’ algorithms in depth and update our websites to meet their requirements. As mentioned at the beginning of this article, WordPress is not actually a terrible platform for SEO; it's just a matter of knowing where the pitfalls are and there are many.