felixarntz/global-admin

View on GitHub
wp-global-admin/wp-admin/global/settings.php

Summary

Maintainability
A
0 mins
Test Coverage

TODO found
Open

            //TODO: what do we need here? What makes sense?

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '__'.
Open

    wp_die( __( 'You do not have permission to access this page.' ), 403 );

Opening PHP tag must be on a line by itself
Open

    ?><div id="message" class="updated notice is-dismissible"><p><?php _e( 'Settings saved.' ) ?></p></div><?php

Inline PHP statement must end with a semicolon
Open

                    <input name="global_name" type="text" id="global_name" class="regular-text" value="<?php echo esc_attr( get_global_option( 'global_name', '' ) ) ?>" />

All output should be run through an escaping function (like esc_html_e() or esc_attr_e()), found '_e'.
Open

                <th scope="row"><label for="admin_email"><?php _e( 'Global Admin Email', 'wp-global-admin' ) ?></label></th>

All output should be run through an escaping function (like esc_html_e() or esc_attr_e()), found '_e'.
Open

                            <?php _e( 'Allow network administrators to edit users', 'wp-global-admin' ); ?>

Each array item in a multi-line array declaration must end in a comma
Open

            '<p>' . __( 'This screen sets and changes options for the entire setup as a whole. The settings on this page will affect all networks and sites.', 'wp-global-admin' ) . '</p>'

Inline PHP statement must end with a semicolon
Open

    ?><div id="message" class="updated notice is-dismissible"><p><?php _e( 'Settings saved.' ) ?></p></div><?php

All output should be run through an escaping function (like esc_html_e() or esc_attr_e()), found '_e'.
Open

    ?><div id="message" class="updated notice is-dismissible"><p><?php _e( 'Settings saved.' ) ?></p></div><?php

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found '__'.
Open

    wp_die( __( 'Multinetwork support is not enabled.', 'wp-global-admin' ) );

Array item not aligned correctly; expected 4 spaces but found 8
Open

        'title'   => __( 'Overview', 'wp-global-admin' ),

Expected 1 spaces after opening bracket; 0 found
Open

    '<p>' . __('<a href="https://github.com/felixarntz/wp-global-admin/wiki/Global-Admin-Settings-Screen" target="_blank">Documentation on Global Settings</a>', 'wp-global-admin' ) . '</p>'

All output should be run through an escaping function (like esc_html_e() or esc_attr_e()), found '_e'.
Open

                        <?php _e( 'This address is used for admin purposes.', 'wp-global-admin' ); ?>

All output should be run through an escaping function (like esc_html_e() or esc_attr_e()), found '_e'.
Open

                <th scope="row"><label for="global_name"><?php _e( 'Global Title', 'wp-global-admin' ) ?></label></th>

No space found before comment text; expected "// TODO: what do we need here? What makes sense?" but found "//TODO: what do we need here? What makes sense?"
Open

            //TODO: what do we need here? What makes sense?

Detected usage of a non-sanitized input variable: $_POST
Open

            $value = wp_unslash( $_POST[ $option_name ] );

Inline PHP statement must end with a semicolon
Open

                    <input name="admin_email" type="email" id="admin_email" aria-describedby="admin-email-desc" class="regular-text" value="<?php echo esc_attr( get_global_option( 'admin_email', '' ) ) ?>" />

Array item not aligned correctly; expected 4 spaces but found 8
Open

        'id'      => 'overview',

Array item not aligned correctly; expected 4 spaces but found 8
Open

        'content' =>

Inline PHP statement must end with a semicolon
Open

                <th scope="row"><label for="global_name"><?php _e( 'Global Title', 'wp-global-admin' ) ?></label></th>

Inline PHP statement must end with a semicolon
Open

                <th scope="row"><label for="admin_email"><?php _e( 'Global Admin Email', 'wp-global-admin' ) ?></label></th>

All output should be run through an escaping function (like esc_html_e() or esc_attr_e()), found '_e'.
Open

                            <?php _e( 'Allow network administrators to delete users', 'wp-global-admin' ); ?>

Multi-line array item not aligned correctly; expected 8 spaces, but found 12
Open

            '<p>' . __( 'This screen sets and changes options for the entire setup as a whole. The settings on this page will affect all networks and sites.', 'wp-global-admin' ) . '</p>'

Processing form data without nonce verification.
Open

if ( $_POST ) {

All output should be run through an escaping function (like esc_html_e() or esc_attr_e()), found '_e'.
Open

                            <?php _e( 'Allow network administrators to create new users', 'wp-global-admin' ); ?>

There are no issues that match your filters.

Category
Status