Thanks to the very precious help of @jflatnes, I’ve managed to finish the Item Duplicator plugin. Everything seems to be working fine now, with no more need to edit the core files.
You can find it on GitHub (https://github.com/DBinaghi/plugin-ItemDuplicator).
Comments, suggestions and improvements are all welcome.