Skip to content

Instantly share code, notes, and snippets.

View pretzelhands's full-sized avatar

pretzelhands

View GitHub Profile
@pretzelhands
pretzelhands / _SUMMARY.md
Last active February 26, 2022 21:54
A benchmark of WordPress' official REST API against a raw PHP file.

Performance implications of the official WordPress REST API

On Feb 25, I had to optimize a client's website. A plugin I built for them was struggling with performance issues when liking entries posted by other users. The database query took an average of 1.2ms to perform. Nevertheless, the API response took up to 1.2s(!) in the worst case for 63 bytes of JSON data.

I started investigating and noticed that the official WordPress REST API seemed to be at fault. So I did the first thing I could think of, ripped out the voting script and placed it in a raw PHP script that loads the bare minimum of WordPress I needed to perform my action.

@pretzelhands
pretzelhands / auth.php
Last active July 17, 2023 14:50
German Language files for Laravel 5.4
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various