Skip to content

Instantly share code, notes, and snippets.

@evansolomon evansolomon/slow-plugin.php Secret
Created Feb 16, 2012

What would you like to do?
A really slow WordPress plugin
Plugin Name: Slow plugin
Description: Make a site unreasonably slow
Author: Evan Solomon
function print_a_slow_script() {
function so_slow(miliseconds) {
miliseconds += new Date().getTime();
while( new Date() < miliseconds ) {
//Do nothing except be evil and slow
//Let's wait 5 seconds for anything to happen...
so_slow( 5000 );
//Just 2 more seconds now..."
so_slow( 2000 );
//Load a useless, slow script
function make_the_site_slow() {
if( is_admin() )
add_action( 'wp_print_scripts', 'make_the_site_slow' );
//Just for fun let's append a huge, uncached photo of earth to each post!
function random_big_earth_photo( $content ) {
return $content . "<img src='" . mt_rand(0,1000000) . "'>";
add_filter( 'the_content', 'random_big_earth_photo' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.