More to the point, both the `pathinfo()` and `strlen($tempdir . '/wordpress')` suggestions would be better than the current code.