Title: Problem with MapPress plugin?
Last modified: January 6, 2022

---

# Problem with MapPress plugin?

 *  Resolved [infosws](https://wordpress.org/support/users/nicksws/)
 * (@nicksws)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-mappress-plugin/)
 * Hi,
 * I seem to be having some issue with Autoptimize not working fully ( only minifiying
   a few files ) when MapPress is activated. The moment I turn MapPress off, Autoptimize
   will optimize alot more and its clearly shown in the waterfall ( like you would
   expect ).
 * If these don’t expire, this is a GTMetrix with MapPress on:
    [https://gtmetrix.com/reports/www.bridgwatercarnival.org.uk/otIIIhGr/](https://gtmetrix.com/reports/www.bridgwatercarnival.org.uk/otIIIhGr/)
 * Here is a GTMetrix with it off:
    [https://gtmetrix.com/reports/www.bridgwatercarnival.org.uk/Cb69YruP/](https://gtmetrix.com/reports/www.bridgwatercarnival.org.uk/Cb69YruP/)
 * When you compare the waterfall charts, its completely different.
 * Any idea why this might be? The plugin is MapPress Maps for WordPress.
 * Thanks
    Steven
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fproblem-with-mappress-plugin%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-mappress-plugin/#post-15225674)
 * is this only on pages where mappress is used, or on all?
 * it’s likely the mappress plugin hooking into AO’s API to ensure mappress functions
   OK, maybe check with the developer?
 *  Thread Starter [infosws](https://wordpress.org/support/users/nicksws/)
 * (@nicksws)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-mappress-plugin/#post-15228493)
 * Hi,
 * This effects all pages with or without a Map on them, I did contact the developer
   and they said:
 * > I can’t say why Autoptimize might not perform as expected, but I can tell you
   > that MapPress excludes its scripts & CSS from AO.
   > This is because AO mangles the scripts (which are already minified), preventing
   > both MapPress and the Google APIs from working.
   > You can see the relevant code in file ‘mappress.php’, filter ‘autoptimize_filter_js_exclude’,
   > etc.
   > Again – the exclusion should only be for the MapPress scripts & CSS, so I’m
   > not sure why it would affect anything else.
 * So i’m not really sure where to go from here, its the moment I turn the plugin
   on, AO doesn’t function in the same way.
    -  This reply was modified 4 years, 3 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-mappress-plugin/#post-15228576)
 * as the mappress dev confirmed his code uses the AO API to alter behavior and 
   as the problem goes away when mappress is not active, the problem must be with
   how mappress integrates the AO API.
 * technically; it looks like mappress assumes the JS exclusions are in a comma-
   delimited string, but they can also be in an array instead actually, as per [https://github.com/futtta/autoptimize/blob/beta/classes/autoptimizeScripts.php#L296-L312](https://github.com/futtta/autoptimize/blob/beta/classes/autoptimizeScripts.php#L296-L312),
   so the mappress dev should adapt his code to take array vs comma-delimited string
   into account to fix your problem.
 * hope this helps,
    frank
 *  Thread Starter [infosws](https://wordpress.org/support/users/nicksws/)
 * (@nicksws)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-mappress-plugin/#post-15228953)
 * Hi Frank,
 * I’ll pass this on and let you know of any updates!
 * Thanks
    Steven
 *  Thread Starter [infosws](https://wordpress.org/support/users/nicksws/)
 * (@nicksws)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-mappress-plugin/#post-15244537)
 * Hi Frank,
 * I passed this on and Map Press made some changes which solved the problem!
 * Thanks for the help!
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-mappress-plugin/#post-15244584)
 * great, happy to have been able to help 🙂
 * feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/autoptimize/reviews/#new-post)!
   🙂

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

The topic ‘Problem with MapPress plugin?’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/problem-with-mappress-plugin/#post-15244584)
 * Status: resolved