I have cleaned up the code and rewrote a large portion to make it more bulletproof. I also fixed it so that all posts with hotlinked images are now automatically cached. After you activate the plugin, everything should work automatically (for new posts). For old posts, you still have the option to manually download images and cache them.
This version will also properly cache images that are generated dynamically (example: https://www.domain.com/image.php?id=12345), instead of just grabbing “static” image files.
Cached images are now stored in the wp-content/upload/HLIC directory (by default). The old cache location was in a directory under the plugin name. I changed the cache directory because I did not want my images to disappear if the plugin was deleted.
Release 1.11 contains the above improvements and does not have any problems with local images or images that have already been cached. All local image references and previously cached images are ignored (i.e. it does not try to make copies of them and create super-long pathnames).
If you notice any problems, please post them here.