I am planning to create a plug-in directory.
Sorry, I don't understand this. Moodle has many types of plugins - see https://docs.moodle.org/dev/Plugin_types It is essential to pick a right one for what you want to implement. If you describe the functionality more, we can help you to pick the right type of your plugin here.