Giter Club home page Giter Club logo

wpperformancetester's Introduction

WPPerformanceTester

WPPerformanceTester was written as a tool to benchmark WordPress in the WordPress Hosting Performance Benchmarks (2015) by Review Signal. Current benchmarks are on WPHostingBenchmarks.com. It was designed to test the server's performance by stressing PHP, MySql and running $wpdb queries.

WPPerformanceTester performs the following tests

  • Math - 100,000 math function tests
  • String Manipulation - 100,000 string manipulation tests
  • Loops - 1,000,000 loop iterations
  • Conditionals - 1,000,000 conditional logic checks
  • MySql (connect, select, version, aes_encrypt) - basic mysql functions and 5,000,000 AES_ENCRYPT() iterations
  • $wpdb - 250 insert, select, update and delete operations through $wpdb

It also allows you to see how your server's performance stacks up against our industry benchmark. Our industry benchmark is the average of all submitted test results.


Installation

Download the plugin and install it into your wp-content/plugins folder.

Once activated, it should appear under the Tools section of your wp-admin.

Notes on Performance

Performance can be measured in a lot of ways. WPPerformanceTester was simply one component of a much larger performance benchmark. It tests a single server (or node) that it is running on. So if you're considering looking at the results from a clustered or distributed setup, it may give you limited insight into how well your whole system performs. WPPerformanceTester is about the raw speed a system has to execute code and perform database operations.

Real website performance isn't always correlated with raw speed. A seemingly slow website could have a very fast WPPerformanceTester result. There are lots of layers (namely caching) in making a WordPress website fast. A good caching layer will almost always outperform computing power. But when the caching layers are equal, raw speed can make a difference.

WPPerformanceTester is simply one tool to add to your toolkit in measuring performance. You should have a variety of others to test other facets of performance.

Known Issues

If the script times out (max_execution_time limit) it will not show any results. You can solve this by increasing the max_execution_time in the php.ini. Some plugins may also cause WPPerformanceTester to run exceptionally slow and make it more likely to hit this limit. One such plugin is VersionPress. You can temporarily disable plugins that might be interfering with it as an alternative way to run it.

Note:

  • It's always best to BACKUP EVERYTHING before running ANY new plugin or making changes to your WordPress install.

Changelog

** 2.0.1 **

(April 23, 2024) Minor security update.

Patched CVE-2023-49844. This vulnerability allowed a CSRF which could have let an attacker make an admin to run benchmark unknowingly.

** 2.0.0 **

(December 29, 2021) Major update and version change.

Plugin should now be compatible with latest PHP 8 / MySQL 8.

Benchmarks no longer comparable between versions. Industry benchmarks will only show results from the same version.

benchmark script updated to replace deprecated/broken math functions and mysql functions. Version number in benchmark script reflects version number of current open source library it was based on, NOT WPPerformanceTester version number.

ENCODE() replaced with AES_ENCRYPT to perform mysql benchmark.

Benchmark graph now uses Chart.js 3.7 instead of 1.x which hopefully helps conflicts with other newer plugins.

** 1.1.1 **

(Oct 1, 2021) Minor bug fixes.

** 1.1 **

Added support for hyperdb and socket connections.

** 1.0.1 **

Updated interface to make graphs and results more clear.

** 1.0 **

  • Initial release

wpperformancetester's People

Contributors

erlendeide avatar kevinohashi avatar tomjn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

wpperformancetester's Issues

WordPress Performance metric should be divided by test_wordpress $count for CRUD round number?

Hi,

I recently used WPPerformanceTester to do some test with my WordPress website. Thanks for your tool, and it is very convenient to use. But I have a question that it seems WordPress Performance metric should be divided by test_wordpress $count for CRUD round number, the other metric I got from the tool are all lower than Industry Average, but the WordPress Performance is much higher than the Industry Average. After digging into the code, I find the metric is identical with another metric WordPress Performance Benchmark Execution Time (seconds). If I increase the $count, the metric will increase too. May I ask this metric should be divided by $count, is this right? And may I ask what is the data source/environment setting/parameter config for the Industry Average metric?

Thanks & Best Regards,
Qianqian Bu

Refactor the mysql tests

Hello,

I come to propose to change the way to do the MySQL test because calculating in MySQL both SHA and AES is not the best way and just depending on the implementation of the database engine can change a lot (from a MariaDB, to MySQL or Percona).

For example MariaDB commented in their issues that they had problems replicating the behaviour of MySQL8's AES encryption:
https://jira.mariadb.org/browse/MDEV-9069

On the other hand WordPress doesn't use these functions as often as a SELECT or INSERT. As they commented in another issue maybe they better redo this part separating it in 2 tests:

  • On the one hand writing (with inserts to a table).
  • On the other hand writing (making on that table selects and some join to another table?).

I leave the idea in the air to see what you think @kevinohashi .

Best regards

Split database test into separate read and write tests

The current database test runs both read and write operations. The title however says it tests "Queries per second". This is slightly misleading maybe?

I suggest you split it into read tests and title those results are "queries per second" and into write tests where the result is titled "operations per second" or simply just "read queries" and "write queries". Most of the time WordPress is doing read queries and it makes sense to compare pure read speeds. In particular in clustered environments the read speeds can be super high while write speeds are slower due to having to wait for multiple database servers to acknowledge the write.

graph not showing

I've heard a couple reports of the graph not loading on some WP installs. I haven't been able to reproduce this phenomena. If you have this happen, could you please check the console for javascript errors and share any details here?

Other helpful info might be what other plugins you have active at that time and what theme it is running.

Thanks!

Plugin Notice Errors

Hi Kevin,

The plugin works well but spits out multiple PHP Notices. You have two pull requests that resolve this issue. I wrote basically the same solution before finding this repository.

It's just the WPPerformanceTester_Plugin.php file that needs these two adjustments.

// line 15 
if (isset($_POST['performTest']) && $_POST['performTest'] == true){
// line 340
    public function addAdminScripts() {
      wp_enqueue_script('chart-js', plugins_url('/js/Chart.js', __FILE__));
      wp_enqueue_script('jquery');
      wp_enqueue_style('wppt-style', plugins_url('/css/wppt.css', __FILE__));
      wp_enqueue_style('simptip-style', plugins_url('/css/simptip.css', __FILE__));
    }

    public function addActionsAndFilters() {

        // Add options administration page
        // http://plugin.michael-simpson.com/?page_id=47
        add_action('admin_menu', array($this, 'addSettingsSubMenuPage'));

        if (strpos($_SERVER['REQUEST_URI'], $this->getSettingsSlug()) !== false) {
            add_action('admin_enqueue_scripts', array($this, 'addAdminScripts') );
        }

    }

All my best,

Ben

Disk I/O Test

Would be nice to add some sort of Disk IO test into the benchmark.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.