WordPress.org

Ready to get started?Download WordPress

Forums

Term Menu Order
[resolved] Isn't the autoloading code overkill in this case? (2 posts)

  1. GeertDD
    Member
    Posted 2 years ago #

    I noticed in term-menu-order.php a whole block of code is added just for setting up the autoloader functionality for the plugin. In this case, isn't it over-engineering things? I mean, all you need to load is one class.

    A simple require or include statement seems enough, and probably faster too. I would be interested to get your view on this. Thanks for a good plugin nevertheless!

    http://wordpress.org/extend/plugins/term-menu-order/

  2. jameslafferty
    Member
    Plugin Author

    Posted 2 years ago #

    In the case of this plugin, I think you're probably correct. The reason the autoloader is there is that that's a pattern I've generally used in authoring plugins, mostly with a view to potential future development (I might have an urge or inspiration to expand/change a plugin at some later date, and having autoloading available already might make that easier). If performance is an issue for you, it's simple enough to modify the code to use require or include instead.

    Thanks for trying out the plugin, and for the feedback!

    Cheers,

    J.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic