wp-bootstrap/wp-bootstrap-loader

View on GitHub
wp-bootstrap-loader.php

Summary

Maintainability
A
0 mins
Test Coverage

Showing 23 of 23 total issues

The class WP_Bootstrap_Loader is not named in CamelCase.
Open

class WP_Bootstrap_Loader {
 
/**
* Construct
*
Severity: Minor
Found in wp-bootstrap-loader.php by phpmd

Parenthesis should always be used when instantiating a new object.
Open

new WP_Bootstrap_Loader;
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Doc comment short description must start with a capital letter
Open

* jquery_migrate_async function.
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Function return type is void, but function contains return statement
Open

* @return void
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Expected 1 spaces before closing bracket; 0 found
Open

add_filter( 'script_loader_tag', array( $this, 'jquery_migrate_async' ), 10, 3);
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Visibility must be declared on method "bootstrap_editor_css"
Open

function bootstrap_editor_css() {
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Expected 1 spaces before closing bracket; 0 found
Open

add_filter( 'script_loader_tag', array( $this, 'bootstrap_async' ), 10, 2);
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Visibility must be declared on method "bootstrap_scripts"
Open

function bootstrap_scripts() {
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Class file names should be based on the class name with "class-" prepended. Expected class-wp-bootstrap-loader.php, but found wp-bootstrap-loader.php.
Open

<?php
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Resource version not set in call to wp_register_style(). This means new versions of the style will not always be loaded due to browser caching.
Open

wp_register_style( 'bootstrap', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css', '', null, 'all' );
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Expected 1 spaces between opening bracket and argument "$tag"; 0 found
Open

function bootstrap_async($tag, $handle) {
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

No space before closing parenthesis is prohibited
Open

function bootstrap_async($tag, $handle) {
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Visibility must be declared on method "jquery_migrate_async"
Open

function jquery_migrate_async( $tag, $handle ) {
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Found precision alignment of 1 spaces.
Open

/*
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Visibility must be declared on method "__construct"
Open

function __construct() {
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

No space after opening parenthesis is prohibited
Open

function bootstrap_async($tag, $handle) {
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Function return type is void, but function contains return statement
Open

* @return void
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Resource version not set in call to wp_register_script(). This means new versions of the script will not always be loaded due to browser caching.
Open

wp_register_script( 'bootstrap', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js', 'jquery', null, true );
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Resource version not set in call to wp_register_script(). This means new versions of the script will not always be loaded due to browser caching.
Open

wp_register_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', null, null, true );
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Visibility must be declared on method "bootstrap_async"
Open

function bootstrap_async($tag, $handle) {
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Inline control structures are not allowed
Open

if ( 'bootstrap' !== $handle )
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Inline control structures are not allowed
Open

if ( 'jquery-migrate' !== $handle )
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer

Newline required after opening brace
Open

if ( ! defined( 'ABSPATH' ) ) { exit; }
Severity: Minor
Found in wp-bootstrap-loader.php by phpcodesniffer
Category
Status