I would recommend you a good plugin for improving WP Security, something that would prevent malicious code from being uploaded to the server, but I don't know any free ones, that impresesssed me.
If you work with Wordpress a lot I recommend that you get a WPMU Dev subscription, they have a lot of great plugins. For security https://premium.wpmudev.org/project/wp-defender/ .