WordPRess GSoC

Opened 5 years ago

Closed 5 years ago

#377 closed defect (fixed)

Code Review of PBE Plugin

Reported by: jshreve Owned by: codebykat
Milestone: 2013 Final (1.0) Priority: normal
Component: Post by Email Keywords:
Cc: jshreve


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='.$_GETpage?.'&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( $optionspin?, ']' ) ) {

spacing between if and (

7) In your diff for 3.7


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

Change History (2)

#1 @jshreve
5 years ago

  • Cc jshreve added
  • Owner set to codebykat
  • Status changed from new to assigned

#2 @codebykat
5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in [2354].

Note: See TracTickets for help on using tickets.