[wp-hackers] Plugin Review Request: WP-Realtime-Sitemap
Aero Maxx
aero.maxx.d at gmail.com
Sat Sep 17 13:07:49 UTC 2011
Hi Peter,
Ok great stuff, thanks very much!
Anyone else with good/bad feedback on my plugin ?
http://wordpress.org/extend/plugins/wp-realtime-sitemap/
On 16/09/2011 22:57, peter baylies wrote:
> Daniel,
>
> A lot of this looks pretty good to me; one cosmetic detail I noticed about
> your plugin -- it looks like a lot of code, but a fair bit of that relates
> to configuring the plugin settings. You could clean this up by using, for
> example, an array of setting ids coupled with a for() loop, to cut down on
> redundant code. Also I'd suggest using a case default statement for the most
> common case, and putting several case labels together in a row to take care
> of other fairly common cases.
>
> Example:
>
> case 'tags_show_post_count':
> $values = array(
> true =>
> __('True', 'wp-realtime-sitemap'),
> false => __('False
> (Default)', 'wp-realtime-sitemap'),
> );
> break;
>
> case 'tags_hide_empty':
> $values = array(
> true => __('True
> (Default)', 'wp-realtime-sitemap'),
> false =>
> __('False', 'wp-realtime-sitemap'),
> );
> break;
>
> Try this instead:
>
> case 'tags_show_post_count':
> case 'tags_hide_empty':
> $values = array(
> true => __('True
> (Default)', 'wp-realtime-sitemap'),
> false =>
> __('False', 'wp-realtime-sitemap'),
> );
> break;
>
> Cheers,
>
> -- Peter Baylies
> Semper Fi Web Design
>
> On Wed, Sep 14, 2011 at 1:32 AM, Aero Maxx<aero.maxx.d at gmail.com> wrote:
>
>> Hello Everyone,
>>
>> This is my first plugin that I have ever written and I would like to write
>> some more, but first I would like a bit of feedback on the first one, the
>> plugin itself, the code and so on.
>>
>> Have tried to do things like 1 entry in the database instead of several
>> individual options as have googled a lot when was writting it and this
>> plugin is fairly old now.
>>
>> If I could get some feedback good or bad, I dont mind.
>>
>> http://wordpress.org/extend/**plugins/wp-realtime-sitemap/<http://wordpress.org/extend/plugins/wp-realtime-sitemap/>
>>
>> Thanks for your time
>> Daniel.
>> ______________________________**_________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.**com<wp-hackers at lists.automattic.com>
>> http://lists.automattic.com/**mailman/listinfo/wp-hackers<http://lists.automattic.com/mailman/listinfo/wp-hackers>
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list