Wordpress plugin need improvement

wordpress

#1

I created a plugin and submit codecanyon. Now it rejected and need some improvement.

    • Make sure that the code doesn’t raise any PHP errors, notices or warnings. Enable WP_DEBUG.
    • Include CSS/JS file the right way using wp_enqueue
    • Please do not deregister or ignore the default version of jQuery being used by the theme and load a custom version.
    • Run the code through the plugincheck WP plugin.
    • Make sure no deprecated methods are being used by the plugin. The above plugin will catch most of them so just do a quick check.

I have not found any errors when enable WP_DEBUG. o.O
And looks on code. I think I include CSS/JS file wp_enqueue. No?

add_shortcode( 'pull-quote', 'pull_quote_shortcode' );
function vtour_360_shortcode( $atts) {

	$output = '';

	 $pull_quote_atts = shortcode_atts( array(
        'width' => '100%',
        'height' => '300px',
        'img' => ' ',
        'audio' => 'false',
        'audio_src' => ' ',
        'autoscrol' => 'true',
        'control' => 'true'


   		 ), $atts );


	wp_enqueue_script( 'jquery-min', plugins_url( '/js/jquery-1.12.2.min.js', __FILE__ ) );
	wp_enqueue_script( 'three-min', plugins_url( '/js/three.min.js', __FILE__ ) );
	wp_enqueue_script( 'jquery-fullscreen', plugins_url( '/js/jquery.fullscreen.js', __FILE__ ) );
	wp_enqueue_script( 'mousetrap-min', plugins_url( '/js/mousetrap.min.js', __FILE__ ) );
	wp_enqueue_script( 'virtual-tour-js', plugins_url( '/js/360.virtual.tour.js', __FILE__ ) );
	/* CSS */
	wp_enqueue_style( 'custom-style', plugins_url( '/css/style.css', __FILE__ ) );
	wp_enqueue_style( 'font-awesome', plugins_url( '/css/font-awesome.min.css', __FILE__ ) );
    
	 ?>
	 <!-- HTML goes there -->
<? } ?>
	<?
		   return $output;

}
 
function vtour_360_register_shortcode() {
    add_shortcode( 'vtour_360', 'vtour_360_shortcode' );
}
 
add_action( 'init', 'vtour_360_register_shortcode' );

add_action( 'admin_menu', 'vtour_360_custom_admin_menu' );
 
function vtour_360_custom_admin_menu() {
    add_options_page(
        '360 Virtual Tour WP',
        '360 Virtual Tour WP',
        'manage_options',
        'vtour_360',
        'vtour_360_options_page'
    );
}

function vtour_360_options_page() {
    ?>
   <!-- HTML goes there -->
    <?php
    
}

Please help to improve code!. Thank you.


#2

go through the items 1 by 1, tick them off as you have at least 1 error, you’re registering jquery 1.1.12 in your plugin when WordPress includes it’s own version… don’t do this.

Install the plugincheck plugin on your demo to double check for any errors.


#3
  1. Do not need to include jquery? Wordpress already has jquery?
  2. And plugincheck see all function like error: http://prntscr.com/ay2pf8