There are plenty of free plugins allowing you to do the same,
Why are you doing this? Make a more specific type of plugin if you're willing to monetize it,
No one would help without checking the code as well,
Either upload it publicly or hire someone to fix it privately