Plugins

April 1st, 2009

Here is a list of WordPress plugins I wrote:

  • My CDN v1.2

    Help you offloading javascript, css and theme files to your own CDN network. This plugin only handle url rewriting not actual file transferring.
    Screenshot:
    screenshot-1

  • Real IP v1.3

    Correct comment’s IP address if you are behind a proxy or load balancer. More info on X-Forwarded-For

    .

  • Parallel Load v1.5

    Improve your javascript loading time by using document.write tag. Javascript bottom loading which further improves perceivable performance can be enabled under Settings/Miscellaneous once this plugin activated.

    Pagetest with plugin:
    pl-enabled
    Pagetest without plugin:
    pl-disabled
    Bottom loading settings:
    pl-settings

    Pagetest is a free service by Aol.com
    More info can be found here.

  • Image Optimizer v1.0

    Reduce uploaded images’s size with Optipng and Jhead. There is no option for this plugin.

    Requirements:

    1. Optipng
    2. JHead
    3. Disable safe mode in PHP
  1. February 24th, 2009 at 11:07 | #1

    hi. Thanks for plugin

    perfect.

    Regards

  2. Bret
    February 25th, 2009 at 19:08 | #2

    Hi,

    I’m using WPMU but installed this as a regular plugin. I am getting the error when I submit my options on the admin page for your plugin:

    Error! Options page not found.

    I would LOVE to see this working in WPMU as it is an IDEAL solution and most plugins for Wordpress do work with WPMU if installed as a regular plugin.

    I really hope there is a way to get this to work in WPMU!

    Could you

  3. yejun
    February 25th, 2009 at 21:04 | #3

    I will look into it. I think you still can hack wp file directly as I described in the other post.

  4. Bret
    February 26th, 2009 at 16:07 | #4

    Hey yejun, GREAT plugin and I fixed it for use with WPMU! I don’t write plugins but am a programmer (new to Wordpress).

    Here are the changes:

    function my_cdn_options() {
    if ( isset($_POST['action'])&& ( $_POST['action'] == ‘update_my_cdn’ )){

    update_option(’my_cdn_old_url’, $_POST['my_cdn_old_url']);
    update_option(’my_cdn_exclude’, $_POST['my_cdn_exclude']);
    update_option(’my_cdn_js’, $_POST['my_cdn_js']);
    update_option(’my_cdn_css’, $_POST['my_cdn_css']);
    update_option(’my_cdn_theme’, $_POST['my_cdn_theme']);

    ?>

    === then just as before except leave the action blank in the tag then change the submit button like so ===

    <input type=”submit” name=”Submit” value=”" />

    === and that’s it.

    With those changes this *should* work in regular WP as well as WPMU (please verify) ver 2.7

    Installation in either is exactly the same as you describe!

    Hope that helps!

    • yejun
      March 8th, 2009 at 02:55 | #5

      I made these changes in version 1.2, but I did not test it.

  5. Bret
    February 26th, 2009 at 16:10 | #6

    Oops…I should also add that I changed the hidden field ‘action’ to ‘update_my_cdn’ instead of just ‘update’.

    That’s needed, too, for this to work correctly.

  6. yejun
    February 26th, 2009 at 16:35 | #7

    Thanks for the updates. I am new to wordpress as well. So most option parts are just copy and paste. I will try to make it wpmu compatible in next release.

  7. Daniel
    February 28th, 2009 at 18:15 | #8

    Hello, love your CDN plugin, but I am having a little trouble. I have set the CSS and Theme directory to a subdomain, but nothing seems to be happening. When I check my page source, it hasn’t changed the URI for either one. Did I miss something?

  8. yejun
    February 28th, 2009 at 18:23 | #9

    You can try put
    define(’WP_CONTENT_URL’, ‘http://static.mydomain.com/wp-content’);
    in your wp-config.php. But this will break your uploads and some other plugin urls. If you let me know which theme, I can have a look.

  9. Daniel
    February 28th, 2009 at 19:59 | #10

    Thanks for the quick reply Yejun. I built the theme on Sandbox, by plaintxt.org. I haven’t changed the header information much.
    Here is a clip of most of the header:

    <meta http-equiv="content-type" content="; charset=" />
    <link rel="stylesheet" type="text/css" href="" />

    <link rel="alternate" type="application/rss+xml" href="" title="" />
    <link rel="alternate" type="application/rss+xml" href="" title="" />
    <link rel="pingback" href="" />

    body{behavior:url("/js/csshover3.htc");}

  10. Daniel
    February 28th, 2009 at 20:01 | #11

    That didn’t paste correctly. But you can download Sandbox at here: http://www.plaintxt.org/themes/sandbox/

    And take a look at it.

  11. yejun
    February 28th, 2009 at 20:48 | #12

    I looked sandbox. I seems it should work. Can you try the last change mentioned in this post?
    http://blog.mudy.info/2009/02/how-to-use-simplecdn-with-wordpress/

  12. Daniel
    February 28th, 2009 at 21:22 | #13

    Hi Yejun. It was working the whole time. I am just dense. I thought I would be able to see the CDN static URL in my source when I look at my site. But I guess it doesn’t. When I use http://www.pingdom.com to test the site speed I can see it is pulling the files from the static subdomain.

    Thanks, love the plugin!

  13. Martin
    March 3rd, 2009 at 06:59 | #14

    Hello Yejun, I have stumbled on your Parallel Load plugin on wp.org and did give it a whirl with footer load enabled, hoping for a small additional performance boost through parallel loading (scripts load in the footer already on the blog I manage thanks to the Footer Javascript plugin). I love the idea, but I had to remove Parallel Load it because it silently killed the Slimbox2 scripts (they never turned up in the page source processed by the plugin. Do you think Parallel Load might choke on the CSS file Slimbox2 errouneously enqueues with its scripts? Although this does not validate when redirected to the footer, it works fine otherwise, but fails with Parallel Load.

    • March 3rd, 2009 at 14:10 | #15

      I fixed a bug in my plugin. I hope parallel loading function will work with slimbox2. But the bottom loading will still not work. In fact a lot ajax plugin expect head loaded library.

  14. Martin
    March 3rd, 2009 at 07:01 | #16

    …and I forgot to add I did of course deactivate Footer Javascript, and refresh the cache, before testing Parallel Load :).

  15. Martin
    March 4th, 2009 at 06:51 | #17

    Thanks for such a quick reaction, and pity about the bottom loading. Just for your information, Slimbox2 works just fine loaded in the footer with the Footer JavaScript plugin (though it will only work after the scripts have fully loaded, of course – which makes for a small delay where the user can click on an image without Slimbox firing, but that is a minor annoyance compared to the advantage of subjectively faster loading through footer scripts). I hope you get around to having bottom load work too; right now, I think I’ll stick with Footer Javascript, but will keep an eye open for developments on Parallel Load :).

    • yejun
      March 4th, 2009 at 14:05 | #18

      I just tested wp-slimbox2. It is working. If you also use my cdn plugin. You need put slimbox2_autoload.js.php in excluding list.

  16. March 5th, 2009 at 13:51 | #19

    Hi, i use your plugin and it works great, but in IE 7.0 i get a message “Ready, but with errors on page”. Object expected. How can i solve this?

    Thanks in advance.

    • yejun
      March 5th, 2009 at 14:01 | #20

      Can you click the error and see what exactly it is?

      • March 5th, 2009 at 14:05 | #21

        Sure, i have to translate this its in Dutch.

        Line: 2
        Token: 1
        Error: object is expected
        Code: 0
        URL: my URL

        This dont show up in other browsers.

        • yejun
          March 5th, 2009 at 16:29 | #22

          Which plugins are you using? I have seen same error with slimbox2 in ie7. I will investigate it over this weekend.

        • yejun
          March 5th, 2009 at 16:54 | #23

          I found the problem. Contact form 7 plugin loads some script by itself. I will try to figure out a work around for that problem.

  17. March 8th, 2009 at 05:24 | #24

    Problem with Ajax Edit comments plugin: http://ajaydsouza.com/wordpress/plugins/wp-ajax-edit-comments/
    Instead of an Ajax page I’ve got a regular page impossible to close.
    Can you fix this please ?

    • yejun
      March 8th, 2009 at 11:00 | #25

      It will be helpful, if you can email the source of the html which causes this problem to yej@gmail.com

  18. March 9th, 2009 at 06:05 | #26

    OK, I just send you a txt file with the source.

  19. March 9th, 2009 at 19:28 | #27

    Great plugin, but IE reports a bug when the plugin is on (it doesn’t when it’s off)…

    Webpage error details

    Message: ‘wpListL10n’ is undefined
    Line: 5
    Char: 1
    Code: 0
    URI: http://www.michelfortin.com/wp-includes/js/wp-lists.js

  20. yejun
    March 9th, 2009 at 20:17 | #28

    Which version are you using? Please email me yej@gmail.com the html source which causing the error.

    • March 10th, 2009 at 18:37 | #29

      Well, apparently, you updated your plugin — I updated it through WP’s admin panel, and now it works fine. ;)

  21. Michael
    March 13th, 2009 at 15:07 | #30

    I was really looking for a plugin like Real IP as we are setting up a load balanced WP environment. However, when I activated it, I got a fatal error. Granted, we have a different setup where all of the WordPress php files are on a Cloud Storage setup which is a mount point (symlink).

    Here is what the error said: Fatal error: Call to undefined function filter_var() in /mnt/cloudstorage/mydl_wordpress/wp-content/plugins/real-ip/real-ip.php on line 28

    Any thoughts?

  22. March 30th, 2009 at 06:57 | #32

    Works great, thank you

  23. Dave
    April 1st, 2009 at 16:23 | #33

    Hi there,

    I know that Parallel Load 1.4 was supposed to be compatible with Fancybox for Wordpress, but it doesn’t work in my case. Parallel Load loads the external scripts into the header after Fancyboxes calls.

  24. April 1st, 2009 at 20:19 | #34

    @Dave
    I fixed it 1.5.

  25. Dave
    April 2nd, 2009 at 12:03 | #35

    @Yejun
    Beautiful, thank you so much!!! Works perfectly. Do you take donations?

  26. April 2nd, 2009 at 12:43 | #36

    @Dave
    You are welcome.
    Here is my paypal donation link.

    Please feel free making request, suggestion and reporting bugs here. Donations are not required but are surely appreciated

  27. April 2nd, 2009 at 18:09 | #37

    Good work with this plugin, thanks.

  28. Sam
    April 2nd, 2009 at 22:08 | #38

    Thanks for Real IP. Statpress is now reporting the correct IPs. I run my WP install behind a proxy and prior to finding your plugin I was dreading having to modify WP core.

  29. myname
    April 5th, 2009 at 05:24 | #39

    How is it possible that after installing Real IP plugin the IP from the spammer is 127.0.0.1 (localhost)

  30. April 5th, 2009 at 08:24 | #40

    @myname If you use front end proxy or balancer, you need to force it clear x-forwarded-for and x-real-ip. Because spammer can add any header to the http request.
    The default behavior of proxy or balancer are appending to x-forwarded-for header.

  31. Mark Bailey
    April 6th, 2009 at 21:24 | #41

    Does the CDN plug-in also support image/media files (offloading them to the CDN)?

  32. April 6th, 2009 at 22:02 | #42

    @Mark Bailey
    It doesn’t support uploaded files.

  33. Mark Bailey
    April 13th, 2009 at 00:50 | #43

    In looking at the plug-in, I think I could possibly tweak it to also support uploaded files…I am just not sure of the right hook for the upload directory/URL. Can you suggest it?

    The plug-in would be MUCH more valuable if it also supported uploaded media files (not the uploading itself, but the URL rewriting). In a typical blog page the JS, CSS and theme files might only be a small percentage of the page, while uploaded images might be a much larger percentage. If the plug-in supported these too, it could greatly improve load times.

  34. April 13th, 2009 at 01:29 | #44

    @Mark Bailey
    If you read my image optimizer’s source code, you will see those hook.

  35. Mark Bailey
    April 13th, 2009 at 09:43 | #45

    Thanks!

  36. Mark Bailey
    April 13th, 2009 at 10:11 | #46

    @Yejun
    Hmm, I can’t find it. I thought I would simply need to duplicate one of the functions and specify the uploads directory hook, but I can’t figure out how to do it based on your other plug-in. Am I on the right track? Thanks.

  37. April 13th, 2009 at 12:03 | #47

    @Mark Bailey
    You should hook to wp_update_attachment_metadata.

  38. Mark Bailey
    April 13th, 2009 at 14:18 | #48

    Thank you. That’s what I thought, however I got an error message when I tweaked the plug-in that way. I will go through everything and double-check. Basically I just created additional components in the CDN plug-in, adding to the JS/CSS/theme components but changing the hook. I appreciate the help.

  39. Mark Bailey
    April 13th, 2009 at 20:32 | #49

    @Yejun
    Would you be willing to show me the proper syntax to add this hook? I thought I knew but I do not. Sorry.

  40. Mark Bailey
    April 13th, 2009 at 21:15 | #50

    BTW, I understand that SimpleCDN no longer offers its mirror buckets.

  41. April 13th, 2009 at 21:52 | #51

    It won’t be trivial to add support for uploading. Otherwise I would have done it already.

  42. Mark Bailey
    April 13th, 2009 at 22:59 | #52

    Hi,

    I don’t actually want to add the uploading function itself. I just want to add one more type of file support (images and other files that are added to posts). I just want to add URL rewrite support for these in the exact same way that the plug-in handles other files…but I don’t need to add the actual uploading function.

    I hope I didn’t do a bad job of explaining myself earlier. :-)

    Thanks.

    Mark

  43. Mark Bailey
    April 13th, 2009 at 23:28 | #53

    To further explain, I know that the best way to add an image to a post would be to upload the image directly to the CDN, then add it to the post via URL. I am just trying to figure out how to do a redirect or something else to handle images that have been uploaded directly to the blog (but not the CDN) in the past.

  44. Mark Bailey
    April 21st, 2009 at 14:12 | #54

    Actually, I am able to offload my uploads to the CDN by simply doing a URL redirect from the uploads directory to my CDN. That’s all that is necessary (when the CDN is doing a mirror, or origin pull). It would be great if this functionality was in your plug-in…just a redirect option for the WP uploads directory. This would add the functionality I was mentioning.

  45. May 3rd, 2009 at 06:40 | #55

    SimpleCDN keep changing their product offering.

    They now have a Hurricane offering that seems to be a full CDN

    More interesting is their Lightning offer which is currently in Beta - it is just a raw mirror, no storage costs, and works great with this plugin other than the one feature Mark has been looking for, mirroring uploaded media.
    It might not be suitable for content that gets updated, still need to do some testing on how they handle cache refresh.

  46. August 20th, 2009 at 18:48 | #56

    I’ve just installed your My CDN plugin, and am using it on SimpleCDN. I had previously been using CDN Tools in order to get some performance improvement by loading the common JS files off Google.

    I think that you should add that feature in (pointing to Google JS files), so as to save CDN charges, to parallelize the loading, and to utilise on-browser caching as well. I also couldn’t find an easy way to setup the CDN for images or other media. Perhaps, in the settings page, have a way of adding file extensions to cache, and the prefix of the CDN to use.

  47. Mandy Wellhone
    September 7th, 2009 at 23:59 | #57

    Thanks so much for the real IP plugin. I am using it on my site and it works beautiully. However, when I looked at the code I was surprised to see that you weren’t using the ‘pre_comment_user_ip’ filter. Dont get me wrong, it works perfectly. I was just curious if there was a reason you chose not to use the filter?

  48. February 27th, 2010 at 00:26 | #58

    Thank you for a great plugin. I’m very appreciate it. Cheers!

  49. October 6th, 2010 at 23:56 | #59

    Hi, thanks for this – much appreciated!

    I have been looking for a plug in to reduce uploaded images’s size and also a plugin to improve my javascript loading time.

    This is exactly what I have been looking for!

  50. Satilmis
    March 8th, 2009 at 09:28 | #60

    Yejun, thanks for the fix. My site laods now much faster.

  1. April 18th, 2009 at 18:45 | #1
  2. October 2nd, 2009 at 01:23 | #2