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

Experimental upgrade to latest VIP/WP coding standards #43

Closed
wants to merge 1 commit into from

Conversation

chrisvanpatten
Copy link
Contributor

The VIP coding standards have finally been upgraded to support WPCS 2.x. This PR is an experiment to upgrade to the latest versions and see what breaks.

@chrisvanpatten
Copy link
Contributor Author

Here's the log of what breaks:


FILE: ...rdpress-options-builder-class/src/inc/page-parts/class-panel.php
----------------------------------------------------------------------
FOUND 1 ERROR AND 16 WARNINGS AFFECTING 10 LINES
----------------------------------------------------------------------
 153 | WARNING | Unused variable `$key`.
 156 | ERROR   | Wrong escaping function. href and src attributes
     |         | should be escaped by `esc_url()`, not by
     |         | `esc_attr()`.
 185 | WARNING | Unused variable `$section_key`.
 210 | WARNING | Processing form data without nonce verification.
 210 | WARNING | Missing third parameter for "filter_input".
 211 | WARNING | Processing form data without nonce verification.
 211 | WARNING | Missing third parameter for "filter_input".
 212 | WARNING | Processing form data without nonce verification.
 212 | WARNING | Missing third parameter for "filter_input".
 213 | WARNING | Processing form data without nonce verification.
 213 | WARNING | Missing third parameter for "filter_input".
 277 | WARNING | Processing form data without nonce verification.
 277 | WARNING | Missing third parameter for "filter_input".
 279 | WARNING | Processing form data without nonce verification.
 279 | WARNING | Missing third parameter for "filter_input".
 281 | WARNING | Processing form data without nonce verification.
 281 | WARNING | Missing third parameter for "filter_input".
----------------------------------------------------------------------


FILE: ...ode/wordpress-options-builder-class/src/inc/api/class-update.php
----------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------
 32 | WARNING | Missing third parameter for "filter_input".
 99 | ERROR   | delete_site_option() will overwrite network option
    |         | values, please use the `*_option()` equivalent
    |         | instead (e.g. `update_option()`).
 99 | ERROR   | update_site_option() will overwrite network option
    |         | values, please use the `*_option()` equivalent
    |         | instead (e.g. `update_option()`).
----------------------------------------------------------------------


FILE: .../code/wordpress-options-builder-class/src/inc/api/class-part.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------
 161 | WARNING | Missing third parameter for "filter_input".
 254 | WARNING | Missing third parameter for "filter_input".
 262 | WARNING | Missing third parameter for "filter_input".
 314 | WARNING | Missing third parameter for "filter_input".
 323 | WARNING | Missing third parameter for "filter_input".
----------------------------------------------------------------------


FILE: ...s-options-builder-class/src/inc/fields/class-include-partial.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 56 | WARNING | File inclusion using variable (`$this`). Probably
    |         | needs manual inspection.
----------------------------------------------------------------------


FILE: ...press-options-builder-class/src/inc/fields/class-multiselect.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
 80 | WARNING | Missing third parameter for "filter_input".
 87 | WARNING | Please use an appropriate filter to sanitize, as
    |         | "FILTER_DEFAULT" does no filtering, see:
    |         | http://php.net/manual/en/filter.filters.sanitize.php.
----------------------------------------------------------------------


FILE: ...patt/code/wordpress-options-builder-class/src/inc/class-page.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
 219 | WARNING | Missing third parameter for "filter_input".
 242 | WARNING | Unused variable `$flag1`.
 243 | WARNING | Unused variable `$flag2`.
----------------------------------------------------------------------


FILE: ...ess-options-builder-class/src/class-wordpress-options-panels.php
----------------------------------------------------------------------
FOUND 6 ERRORS AND 2 WARNINGS AFFECTING 8 LINES
----------------------------------------------------------------------
 46 | WARNING | File inclusion using variable (`$file`). Probably
    |         | needs manual inspection.
 50 | ERROR   | Absolute include path must be used. Use
    |         | `get_template_directory()`,
    |         | `get_stylesheet_directory()` or `plugin_dir_path()`.
 51 | ERROR   | Absolute include path must be used. Use
    |         | `get_template_directory()`,
    |         | `get_stylesheet_directory()` or `plugin_dir_path()`.
 52 | ERROR   | Absolute include path must be used. Use
    |         | `get_template_directory()`,
    |         | `get_stylesheet_directory()` or `plugin_dir_path()`.
 55 | ERROR   | Absolute include path must be used. Use
    |         | `get_template_directory()`,
    |         | `get_stylesheet_directory()` or `plugin_dir_path()`.
 56 | ERROR   | Absolute include path must be used. Use
    |         | `get_template_directory()`,
    |         | `get_stylesheet_directory()` or `plugin_dir_path()`.
 59 | ERROR   | Absolute include path must be used. Use
    |         | `get_template_directory()`,
    |         | `get_stylesheet_directory()` or `plugin_dir_path()`.
 63 | WARNING | File inclusion using variable (`$file`). Probably
    |         | needs manual inspection.
----------------------------------------------------------------------

Time: 3.32 secs; Memory: 14MB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants