Except that Wordpress is written in PHP and designed without security as a goal. True, security is all about probability, but Wordpress' odds are not that good.
Windows was originally built without security as a major focus, but has been improved vastly. So has WordPress. Except for a few rare cases where security was a primary goal, such as OpenBSD, most software will be discovered to have vulnerabilities at some point in time.
So it's a good example of software built with security as a primary focus that still has vulnerabilities. I can think of few examples of software that has never had vulnerabilities discovered. OpenSSH maybe?
Yes, however, perusing the history of vulnerability disclosures in popular software demonstrates that the degree of likelihood of a new issue being found varies to a considerable degree based on the software in question.
Given that, software with an exceedingly low historical defect rate could reasonably be considered 'secure'.