I'm evaluating your plugin in a WP installation under a /wordpress/ folder.
I saw that it doesn't work when you set the "public" WP URL to the root of the domain: that is, if WP is in http://mydoma.in/wordpress but the site is http://mydoma.in/ the plugin is broken, since it /wordpress resources under /wp-content/plugins/auto-attachments instead of /wordpress/wp-content/plugins/auto-attachments.
I suggest that you change every call to
get_bloginfo('wpurl') to fix the problem.
By the way, your plugin is very useful!