From cybersec channels, one of the most favourite attack vector a couple of years ago was sharing infected wordpress plugins or nulled themes. This is an annoying fact, but you cannot trust 100% a nulled theme/plugin.
I've found this interesting article in the meanwhile, https://www.wpstuffs.com/detect-maliciou...s-plugins/, which indicates some checks you can do to see if the code looks like suspicious. Of course, a base64 string is suspicious, check what is inside (maybe there is a redirect or a backdoor). Also check the theme by uploading it into "virustotal.com": it's a free service that will scan the file among all the different anti-virus solution. For free. This i will suggest also for suspicious files in your computer. If you are more technologic, you can try to check also their md5 checksum, but will not analyse the content of the file.
in my experience, one time i've found an istitutional website with a jquery script that was tampered and contained 3 additional rows that will redirect to harmful websites. They can hide the script everywhere, be careful.