It is fairly simple to check for obviously malicious JS or PHP code in a theme, but it's not so easy to find themes which are badly written and thus insecure. Can you always spot a XSS or SQL injection vulnerability?
1. Most Wordpress theme developers use popular Javascript libraries, so it wouldn't be too difficult to replace them with the original if you suspected something was amiss. The function wouldn't be a problem, if there wasn't any base64 code.
2. url() references should all be relative, in the same domain, so if it linked on the outside, I'd change it.
Most of the time I use a Wordpress theme as a starting point, rewriting some parts and looking over all of the code.
Also, mentioned above, securing the theme against injections and XSS is important.
What on earth? It's pretty simple to check for malicious Javascript or PHP code in a theme.