Title: [Plugin: comments-likes] Bad code practices
Last modified: August 20, 2016

---

# [Plugin: comments-likes] Bad code practices

 *  [alxvallejo](https://wordpress.org/support/users/alxvallejo/)
 * (@alxvallejo)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-comments-likes-bad-code-practices/)
 * Line 74 of comments-likes.php is
 *     ```
       add_action('wp_head','cl_header');
       function cl_header() {
           echo '<link type="text/css" rel="stylesheet" href="'. get_bloginfo('wpurl').'/wp-content/plugins/comments-likes/comments-likes.css" />'."\n";
           echo '<script type="text/javascript" src="'.get_bloginfo('wpurl').'/wp-content/plugins/comments-likes/js/jquery.js"></script>'."\n";
           echo '<script type="text/javascript" src="'.get_bloginfo('wpurl').'/wp-content/plugins/comments-likes/js/comments-likes.js"></script>'."\n";
       }
       ```
   
 * First of all, you should register your scripts with wp_register_script and enqueue
   it via wp_enqueue_script.
 * Second of all, you should never load your own version of jQuery from the plugin.
   Let WordPress use its own jQuery. This screwed up another jQuery plugin I was
   using and I had to remove the above jQuery load.
 * [http://wordpress.org/extend/plugins/comments-likes/](http://wordpress.org/extend/plugins/comments-likes/)

The topic ‘[Plugin: comments-likes] Bad code practices’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/comments-likes.svg)
 * [comments-likes](https://wordpress.org/plugins/comments-likes/)
 * [Support Threads](https://wordpress.org/support/plugin/comments-likes/)
 * [Active Topics](https://wordpress.org/support/plugin/comments-likes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/comments-likes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/comments-likes/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [alxvallejo](https://wordpress.org/support/users/alxvallejo/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-comments-likes-bad-code-practices/)
 * Status: not resolved