Support » Plugin: Comments - wpDiscuz » Still Slow, Needs Optimization

  • Guys,

    While I really applaud your efforts in making the plugin as small as possible, it still makes websites slow, because of the huge JS and CSS files.

    For example:

    assets/js/wpdiscuz.min.js – 54K
    This file contains a lot of junk, even if we don’t use it (social profiles, richeditor, etc). Please consider separating the contents of this file to separate scripts, so that they are loaded on demand. If I don’t use any of the features of your plugin, I shouldn’t have to suffer.

    themes/default/style.css – 116K!

    Once again, this file contains so much unnecessary junk. Why group everything together and squeeze into a single CSS file? If I pick a different style / layout, it shouldn’t be grouped in a single CSS file, but rather spread in multiple CSS files that correspond to the loaded CSS. You are loading ratings, subscriptions, bubbles, all that stuff together, which should not happen.

    I am well aware of your “minimal” css. However, even your minimal CSS is 56K in size, which is unacceptable. Same problem there – do you really expect people to add more stuff to this file?

    I would love to see a truly minimal approach. A tiny, minified JS for the core functionality of the plugin. The rest of the stuff is loaded on demand. A tiny CSS file with the most essentials to make the comment form function, and if one chooses to load it up and “beautify” it, it should be their option.

    Just my two cents. Please focus on making the plugin lighter. Considering how popular your plugin is becoming, the last thing you want is overloaded, heavy plugin that makes sites slow. We already have so many bloated plugins out there, please don’t be one of them…

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author gVectors Team


    Thank you @megaz,
    The optimization is being done every day.
    As per wpdiscuz.min.js file, I can say the rich editor part is not there if you disable the rich editor. It has a separate JS file which is loaded when the rich editor is enabled. Just disable these two options in wpDiscuz Settings > General Tab to check it easier:

    • Combine JS and CSS Files to Optimize Page Loading Speed
    • Minify JS and CSS Files to Optimize Page Loading Speed

    And yes, there are many parts in the JS file that can be removed based on enabled/disabled features. We’re still working on them.

    The style CSS contains three layout styles so it can be optimized if you use just one of them. This is also planned in near future updates.

    The minimum style is designed for developers to create their own style, it can be 0 KB if you decide to style the comment system from scratch. So the 56KB size you’re mentioning is just a list of CSS code that you may use for your own CSS code, they can be totally removed. The minimum.css file is not for enabling and using, it’s a CSS template for creating your own CSS file. So its initial size doesn’t matter.

    Thread Starter MegaZ


    @gvectors-team, I am aware of the Rich Editor being loaded separately. However, if you open the minified JS file, you will see that you are making a ton of calls to the rich editor (different functions), as well as other features that are potentially unused. I can clean up your JS file myself, but I would rather have you guys do that.

    My recommended approach is to strip out anything that is not needed by the core plugin. If a user adds a module to use (such as subscribers, or bubbles), then add separate JS files. If this is done properly, the main JS file should only be 1-2 KB in size, not 54K.

    Keep in mind that combining scripts or using minified versions doesn’t make your plugin faster – a browser still needs to download and render those files. If you split up the functionality, one can then use a plugin like W3TC to merge all files into a single CSS and JS file and make it super small and fast.

    Please prioritize these fixes / optimizations. If you make this plugin small and lightweight (core plugin functionality), it will instantly be the #1 plugin system for WordPress. At this point, it is running a pile of unnecessary code and CSS – just use a browser inspector and take a look at the Coverage tab – mine is showing that over 80% of the code is not used for both JS and CSS. That’s a lot of unused code to parse for a browser.

    Thanks for clearing up on the minimum style. Instead of having your end users create CSS from scratch, why not make the smallest CSS file that only works with one template and provides only styling for the core plugin? If you do this, it would be the most minimal version, and it would require little to no styling effort on the end part of developers. Right now, one has to deal with all that CSS code and try to figure out what to keep and what to delete…

    Hope this helps. Once again, please don’t take this as a criticism of your work. You guys are doing a lot of great stuff and I am looking forward to seeing WPDiscuz as the most popular comment system for WordPress.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Still Slow, Needs Optimization’ is closed to new replies.