Support » Plugin: Minimum Featured Image Size » Code suggestions

  • Resolved Brian Layman

    (@brianlayman)


    Nice job on the design. This works great. I’m using a customized version of your code on heavy.com now and I wanted to let you know some of the changes I made.

    1. I turned this into a class (actually I merged it with an existing class) so that there are no conflicts in function call names.
    2. I escaped all of the variables added into the messages with esc_attr() before saving it to the database and then upon display I wrapped the whole message in esc_html(). Without this, your plugin should not be considered safe.
    3. I changed your get_option(), update_option() and delete_option() to get_transient(), set_transient() and delete_transient() so that it would use the caching system that is available on well optimized sites rather than forcing a DB write of the value.

    Hope that helps!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Code suggestions’ is closed to new replies.