Use a reliable anti-malware scanner on the downloaded theme archive to check for malicious PHP or JavaScript code.