Title: Plugin Scripts Messing Up Performance Optimization
Last modified: June 2, 2017

---

# Plugin Scripts Messing Up Performance Optimization

 *  [drod7425](https://wordpress.org/support/users/drod7425/)
 * (@drod7425)
 * [9 years ago](https://wordpress.org/support/topic/plugin-scripts-messing-up-performance-optimization/)
 * Hello,
 * I’m developing a custom theme for my company’s web site based upon the Underscores
   starter theme and Bootstrap. I’ve been running performance audits in Google Developer
   tools and one of the audits says that I’m loading external javascript before 
   external css.
 * Now, I’ve already made sure to enqueue my styles before my scripts, but one of
   the plugins I’m using – Easy Twitter Feed Widget – is hooking one of their script
   dependencies before my styles.
 * I see the bit of code that is doing this and I could hook it in a different way,
   but my changes would be lost every time the author updates their plugin. Is there
   anyway to override this behavior other than editing the plugin?
 * Thanks,
    Dave
 * PS WordPress also seems to be injecting their emojis javascript before my styles.
   Any way to move this to the bottom?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [Jose Castaneda](https://wordpress.org/support/users/jcastaneda/)
 * (@jcastaneda)
 * THEME COFFEE MONKEY
 * [9 years ago](https://wordpress.org/support/topic/plugin-scripts-messing-up-performance-optimization/#post-9196130)
 * Hi [@drod7425](https://wordpress.org/support/users/drod7425/)
 * What I’m wondering is why you think the changes would be lost if the plugin is
   updated?
 * One way I can think of would be by changing the hook priorities on both the emoji
   and the Twitter feed one.
 *  Thread Starter [drod7425](https://wordpress.org/support/users/drod7425/)
 * (@drod7425)
 * [9 years ago](https://wordpress.org/support/topic/plugin-scripts-messing-up-performance-optimization/#post-9197960)
 * Hey [@jcastaneda](https://wordpress.org/support/users/jcastaneda/),
 * Thanks for the reply.
 * > What I’m wondering is why you think the changes would be lost if the plugin
   > is updated?
 * To clarify, the code that I’m referring to resides in one of the plugin’s scripts.
   Maybe I’m mistaken, but I was under the impression that if I edit that code, 
   any future update to that plugin would override my changes. Is this not true?
 * > One way I can think of would be by changing the hook priorities on both the
   > emoji and the Twitter feed one.
 * From what I’m seeing the plugin enqueues a script that uses DOM manipulation 
   to insert a different script where it wants. So I can change the priority on 
   the initial script, but the enqueued script will still put the secondary one 
   where it wants.
 * As for the emojis, it’s part of the WordPress core. Similar problem as with the
   plugin, where if I update it, I can expect to lose the changes.
 * Thanks,
    Dave

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Plugin Scripts Messing Up Performance Optimization’ is closed to new 
replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [performance](https://wordpress.org/support/topic-tag/performance/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [drod7425](https://wordpress.org/support/users/drod7425/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/plugin-scripts-messing-up-performance-optimization/#post-9197960)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
