That's easy, stay up-to-date with your WordPress plugins, database, widgets, and versions. As newer versions come along, the old ones become easier to hack. The newer ones of course, are a bit harder since they haven't been out long. So make sure you stay-to-date and you should be good.