Suggestion for optimization
-
Hi there,
By default Font Awesome CSS is loaded by the plugin. But what if people already use it in their theme or added it manually? Then it is loaded twice, which makes absolutely no sense. It would be way better to add an option in the settings whether to enqueue or not enqueue the CSS file.
Same goes for the CSS file of the voting buttons themselves. I myself for example added the CSS to my theme’s CSS file, so I don’t need to load an extra CSS file.
And lastly, all CSS files and the JS file are loaded on all pages/posts/index/…, no matter if there is a comment form present or not. I suggest, these files are only enqueued, if needed. That reduces the number of requests, is better for performance and page speed tools. (I only load the JS on single.php for example, but the detection of the comment form is of course a much better solution). The JS can also be moved to the footer for faster rendering of the page.
Just my two cents…
The topic ‘Suggestion for optimization’ is closed to new replies.