Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/37 #38

Merged
merged 4 commits into from
Feb 18, 2020
Merged

Bugfix/37 #38

merged 4 commits into from
Feb 18, 2020

Conversation

asharirfan
Copy link
Contributor

Description of the Change

These are fixes to the issues raised during the VIP GO review in #37

Verification Process

I have tested the plugin in a local WP environment after the changes.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Changelog Entry

Fixed various verification, sanitization and performance issues in the plugin.

'update_post_term_cache' => false,
'update_post_meta_cache' => false,
'suppress_filters' => true,
'suppress_filters' => true, // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.SuppressFiltersTrue
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set this to ignore the rule because I am pretty sure that we are ignoring caching while performing this query.

@jeffpaul jeffpaul requested a review from dinhtungdu February 14, 2020 16:32
@jeffpaul jeffpaul added this to the 2.4.0 milestone Feb 14, 2020
@jeffpaul jeffpaul added type:enhancement New feature or request. type:bug Something isn’t working. and removed type:enhancement New feature or request. labels Feb 14, 2020
@dinhtungdu dinhtungdu linked an issue Feb 15, 2020 that may be closed by this pull request
Copy link
Contributor

@dinhtungdu dinhtungdu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @pereirinha can you verify this PR with vipgo-ci?

P/s: I tried https://github.com/Automattic/VIP-Coding-Standards but couldn't produce the same error list as your comment.

P/s: I got this warning left after checking with phpcs and :

The "WordPress.WP.TimezoneChange" sniff has been deprecated. Use the "WordPress.DateTime.RestrictedFunctions" sniff instead. Please update your custom ruleset. (WordPress.WP.TimezoneChange.DeprecatedSniff)

// no nonce to verify...
die( -1 );
} else {
check_admin_referer( 'simple-page-ordering_' . sanitize_text_field( wp_unslash( $_POST['screen_id'] ) ) );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be moved outside else. sanitize_text_field( wp_unslash can be placed by sanitize_key

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

simple-page-ordering.php Show resolved Hide resolved
@asharirfan
Copy link
Contributor Author

LGTM. @pereirinha can you verify this PR with vipgo-ci?

P/s: I tried Automattic/VIP-Coding-Standards but couldn't produce the same error list as your comment.

P/s: I got this warning left after checking with phpcs and :

The "WordPress.WP.TimezoneChange" sniff has been deprecated. Use the "WordPress.DateTime.RestrictedFunctions" sniff instead. Please update your custom ruleset. (WordPress.WP.TimezoneChange.DeprecatedSniff)

I just ran the VIP-Coding-Standards and got the same results. The above-mentioned sniff has been discussed over here: Automattic/VIP-Coding-Standards#457

I hope this is helpful. Cheers 🙌

@asharirfan asharirfan mentioned this pull request Feb 17, 2020
6 tasks
@dinhtungdu dinhtungdu linked an issue Feb 17, 2020 that may be closed by this pull request
@samikeijonen
Copy link

@dinhtungdu Seems that this PR is in good place?

Any timeline for merging?

@dinhtungdu
Copy link
Contributor

@samikeijonen No exact timeline for now! But, we're preparing to release 2.3.3, so this will be merged along with other open PRs shortly. Personally, I'm expecting this week.

@jeffpaul
Copy link
Member

@samikeijonen are you able to have VIP run this PR/branch to confirm it resolves all their issues before we merge and tag a release?

@jeffpaul
Copy link
Member

Confirmed that preference from VIP was to review develop, so I'm going to prepare that branchf or this minor release. Thus, merging this in as part of that process.

@jeffpaul jeffpaul merged commit 4af5813 into 10up:develop Feb 18, 2020
@dinhtungdu dinhtungdu mentioned this pull request Apr 7, 2020
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn’t working.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Address VIP GO review Avoid post__not_in
4 participants