Home / Blog / Development / How to Debug WordPress Plugin with 3 Top Priority WordPress Dev Tools

How to Debug WordPress Plugin with 3 Top Priority WordPress Dev Tools

06 June 18
Reading Time: 3 minutes
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)


This plugin is created to facilitate the development, testing and debugging of the code on the WordPress and WooCommerce platform. Premmerce Dev Tools provide such tools as: WordPress debug, WordPress plugin boilerplate generator, WooCommerce product generator and WordPress data cleaner.

We have developed this plugin while we were testing the capabilities of WordPress for the developers. As we develop and maintain a large number of plugins and features, we will constantly improve our tools for the developers, release their new versions and will be happy to share them with you.

Meanwhile, we encourage you to take a look at our research on WordPress Development Environment and Developers Best Practices Review.

The main features of the plugin:

  • Integration of symgony/var-dumper for WordPress debug.
  • Integration of symfony/stopwatch for the execution time checking.
  • WooCommerce product generator – Generating the test data for WooCommerce.
  • WordPress plugin boilerplate generator, which creates the basic files structure.
  • Database clean up.


You can install this plugin from the official WordPress plugin directory.

  1. Unzip the downloaded zip file.
  2. Upload the plugin folder into the ‘wp-content/plugins/’ directory of your WordPress site.
  3. Activate ‘DevTools’ from Plugins page.

See also: WooCommerce Tutorial Step by Step

WordPress debug

Using symgony/var-dumper, you can easily debug the associative arrays and objects. For this, add the following lines to the code:

dump($var); – to output the value;
dd($var);  – to output the value and end the script work.

Here is the result in the front:

For tracking the execution time and memory usage for certain parts of the code, the symfony/stopwatch library is integrated into the plugin.

WordPress plugin boilerplate generator

The WordPress plugin boilerplate generator creates the source files and folders of the plugin based on the boilerplate we developed:

  • assets – images, css, js.
  • languages – translations.
  • src – source code.
  • views – themes.
  • BoilerplatePlugin – the main class of the plugin; the file name is generated from the plugin name.
  • FilteManager.php – the file search within the plugin.
  • Admin.php – the controller from the admin panel.
  • Frontend.php – the controller from the front.
  • composer.json – it is created when the plugin uses composer; in other cases, autoload.php is created.
  • boilerplate.php – the plugin file with the plugin description, where the plugin’s code is being initialized.
  • licence.txt – licence (GPL by default).
  • readme.txt  – readme example.

All the plugin classes are placed under its namespace, which allows you not to use the prefixes while naming classes, as they can be loaded automatically.

For the loading of the classes, the autoloader is being created in the autoload.php file. If the  “Use composer” is ticked, the composer autoloader is being used, in case the plugin includes some libraries via composer.

WooCommerce product generator

The plugin allows you to quickly generate the test data for WooCommerce.
The following settings are available on the Generate data page:

  • Products number – to set the number of the generated files;
  • Generate product photo – to generate photo for every product;
  • Product gallery photos number –  to set the number of the generated photos for the product gallery;
  • Product type – to choose the product type (Simple product, Grouped product, External/Affiliate product, Variable product);
  • Categories number – to set the number of the generated categories; the products will be evenly distributed between them;
  • Attributes number – to set the number of the product attributes, which will be generated and attached to all the products;
  • Each attribute terms number – to set the number of values for every product attribute.

See also: WooCommerce SEO Guide

Data cleaner

On the Clean up page you can quickly:

  • delete all the products, product categories, product attributes from the database;
  • delete the images that are not being used;
  • clean up the database from the elements that are not being used: posts, terms, connections, metadata.

More features coming soon.

Comments (3)
  • Pingback: My Homepage
  • Pingback: taxi utrecht
  • Nam says:

    This is just theory. The reality will be much heavier. Search queries are very difficult. If you install Plugin ACF + Full image, it will produce different results

Leave a Reply

Your email address will not be published. Required fields are marked *


What clients say about Premmerce

Great, free, useful plugin if you want your category link to be yourURL/category name and product link to be yourURL/product-name. Even skips parent category names. Thank you so much!
Riley Pearcy
THi All, We us this plugin for a big website we run. This plugin works with the famous WPML plugin. It’s removes the Product category base and the shop link in a Multilingual website. Must have for all WooCommerce users!!! Regards from a satisfied user.
Lian Perry
The Premmerce Filter is BY FAR the best product filter plugin available for WordPress. It works well out of the box with a great layout. It’s something that you would think would be so simple, but finding a great product filter tool sure wasn’t easy. Really love how well it integrates with the Premmerce Brands plugin as well. Thanks!!
Rommie Mercer
Order service
[contact-form-7 404 "Not Found"]