Support » Plugin: Universal Star Rating » live image generation

  • Resolved viliusl


    Image generation on live should be never used.
    It is better to use static images
    Even better to use sprites
    Best: use html symbols like: β˜†β˜…

    file: /includes/stars.php

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Chasil



    What is the exact problem?

    Live generation of images is for some people a “problem” and for others not. I don’t believe that servers are so bad that it makes a difference for the user. But everyone is free to use something else like fixed html stars. From my point of view nice pictures are worth some milliseconds πŸ˜‰


    Thread Starter viliusl


    See email for details.
    Also implement live image generation right is really hard. You version is far from that. And it can be not secure and is bad practise usually.

    Thread Starter viliusl


    i can not send email, so will say here: there are vulne_rabilities in your plugin, because you don’t escape $_GET data. Golden rule: never trust data from $_GET, $_POST, $_REQUESTS.

    Plugin Author Chasil


    Thanks for the hint.

    I added some filters to make it more secure. You are right and it is never as secure as plain html. I will think about an option to only use static pictures but that won’t be as flexible as live image generation is.

    Let me know if you would suggest some more changes.


    Anonymous User 15382528


    Hi Chasil,

    The live generation is also causing problems with WP Rocket caching plugin. Most likely it is causing problem for other caching plugins as well.

    The problem is with both USR and WP Rocket plugings are activated, then there will be many php-cgi processes running, and MySql would run at 100% CPU, taking down the server.

    Furthermore, the stars are not showing up in Opera browsers.

    I think this is a huge design flaw. Could you please fix this issue?

    Thread Starter viliusl


    live gengeneration is evil, but if you still want to use it, do something like this:

    1. by default use static images
    2. provide ability to generate fancy icons. If user choose it – generate stars ONCE and save them locally.
    3. When user open page with your plugin activated, provide static images or already generated images on step 2.

    Plugin Author Chasil


    @samhuge: I don’t know how the other plugins work so I can only guess that the live image generation is causing the caching plugin to fail. For the moment I recommend to deactivate/uninstall USR or the caching plugin depending on what you need the most. From my point of view I would not use a caching plugin for a private site. Have never seen performance issues on these kind of websites. When USR supports static rating images it should work again but that will take a while…

    @viliusl: Thanks. I got your point and will think about it.


Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘live image generation’ is closed to new replies.