We all know very well how simple WordPress is, but at the same time rich in add-ons and extensions, and that is why it has become so popular. However, its saturation and abundance can cause system overload and slow your site.
Choosing an inappropriate template that will generate a lot of database queries, or using a large number of plugins that will greedily consume memory, can directly affect the speed of the site on the screen. That is why we need tools that will easily allow us to recognize problems – what exactly is slowing down the download, or which plugin is responsible for the memory leak.
This is what Zend Server Z-Ray does.
Zend Server Z Ray
Z-Ray displays everything that is and happens “under the hood”, or rather, shows all the necessary data about each request. This makes it easy to identify problem areas or make sure that we are doing everything right.
Z-Ray is automatically added to each page generated on the server, which allows you to instantly find errors without additional effort, and does not affect the development of your application.
Z-Ray displays a complete list of queries called from WordPress. Or rather, the request itself, its parameters, the result of the request, its duration, the number of affected lines, and a link to the place in the code from where this request was called. In addition, you can get a stack trace, or rather, a detailed list of functions and scripts that led to this request.
Information directly from WordPress
With Z-Ray, there is no need to install additional tools to get information from WordPress about your specific application, such as the list of active plugins and their loading time, the cache of objects and the amount of memory required for them, the schedule of scheduled “crown tasks” and their frequency. calls, executed functions from your template and their execution time, and much more.
Simplified debugging and profiling
Z-Ray provides the ability to debug the code without additional settings or changes to the code. There is no need to install additional browser plugins or WordPress extensions. Everything you need is already in the Z-Ray panel, and you can easily start debugging code in your preferred development environment, such as Zend Studio or PHPStorm.
Debugging in a mobile environment
For developing non-browser projects such as mobile applications or web services, there is Z-Ray Live! Z-Ray Live displays detailed information not only about this request but also about all requests that come to the server. An example of this method of operation and additional information can be seen in the following video clip:
Z Ray Extension
One of the important advantages of Z-Ray is the ability to add custom panels in which you can display the information you have collected. For example, if you are using the PHP Framework for which there is no pre-made extension, you can easily get and display data using the Z-Ray API.
Also see: WordPress SMTP Configuration
An explanation of how to write your own extension is here, and the code and documentation are on the GitHub site.
Since Z-Ray is part of Zend Server, you first need to download and install Zend Server. After the 30 day trial period, you will need to purchase a commercial license.
It is also possible to ask for a free license if, for example, you are actively involved in the development of an open-source project such as WordPress. More information can be found here.