Hello, yes it's possible to replicate a plugin's functionality without infringing intellectual property rights - unless there is a patent, which is very unlikely. Trademark issues are usually the issue at hand in the WordPress community. You cannot use trademarks from another product, so the name of the plugin would have to be changed and all references deleted. As long as the product doesn't use code from the original, it's not an infringement. If the existing plugin is GPL (all in the plugin repository are), then you can sell the plugin without changing it at all (except to remove trademarks), but you must make the source code publicly available, WooCommerce for example is GPL including all their add-ons, so you can sell their add-ons as long as you change the name. I am a WordPress plugin developer, if you would like to discuss this project further, please send me a message.