WordPress.org

WordPRess GSoC Trac

Opened 7 months ago

Closed 7 months 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

Description

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

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

Change History (2)

comment:1 jshreve7 months ago

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

comment:2 codebykat7 months ago

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

Fixed in [2354].

Note: See TracTickets for help on using tickets.