It didn't failed when I was removing from database when 60 000 images were found. It will fail only if someone have some limits on their server but even that they can change first $i=
for ($i=1; $i <= $limit; $i++) {
to $i=WHATEVER_THE_NUMBER_THAT_SCRIPT_FAILED
... but from my testing it was quite fast for fastly written script. Even if script failed then it will just check some mysql and directories without deleting previously deleted images so it will go quicker on the second, third attempt.
You just want to sell your paid solution and that's it because You know that my solution works.