[wp-gsoc] [Summer of Code] #377: Code Review of PBE Plugin

Summer of Code noreply at wordpress.org
Thu Sep 19 17:00:57 UTC 2013


#377: Code Review of PBE Plugin
------------------------------+---------------------------
 Reporter:  jshreve           |       Type:  defect
   Status:  new               |   Priority:  normal
Milestone:  2013 Final (1.0)  |  Component:  Post by Email
 Keywords:                    |
------------------------------+---------------------------
 1) In some of the Javascript you have "});". There should be a space
 between the brace and parenthesis.

 2) Spacing needed here:
 admin_url('tools.php?page='.$_GET['page'].'&tab=security')

 3) Lines like the following:

 var logNonce = "<?php echo wp_create_nonce( 'post-by-email-clear-log' );
 ?>";

 should use http://codex.wordpress.org/Function_Reference/esc_js

 Even though wp_create_nonce is a pretty trusted function it's still good
 practice.

 4) I woudn't hardcode "five minutes" in this new message:
 "Please wait at least five minutes to check mail again!"

 What if WP_MAIL_INTERVAL is not 5 minutes?

 5) In save_attachments


 {{{
 $list = $this->connection->fetch( 'INBOX', $query, array(
                 'ids' => $uid
         ));
 }}}


 Spacing at the ));

 There are similar lines in that function too.

 6) class-post-by-email-admin.php

 if( strpos( $options['pin'], ']' ) ) {

 spacing between if and (

 7) In your diff for 3.7

 do_action('wp-mail.php');

 Could use spacing. Besides that the patch looks good to me.

 8) array_unshift( $log, array( 'timestamp'=>current_time( 'timestamp' ),
 'message'=>$message ) );

 Array spacing. in class-post-by-email.php

--
Ticket URL: <http://gsoc.trac.wordpress.org/ticket/377>
Summer of Code <http://gsoc.trac.wordpress.org>
My example project


More information about the wp-gsoc mailing list