10up https://10up.com finely crafted websites and tools Mon, 20 Nov 2017 17:38:10 +0000 en-US hourly 1 https://wordpress.org/?v=4.8.3 Klein News Innovation Camp, Web Summit, WordCamps, and Other Recent 10up Talks https://10up.com/blog/2017/klein-news-innovation-camp-web-summit-wordcamps-and-other-recent-10up-talks/ https://10up.com/blog/2017/klein-news-innovation-camp-web-summit-wordcamps-and-other-recent-10up-talks/#respond Thu, 02 Nov 2017 21:44:18 +0000 https://10up.com/?p=18856 Service (to our clients, our colleagues, and our communities) is one of 10up’s core values, and one way we see that value made concrete is in sponsoring and speaking at various conferences connected to WordPress, content publishing, and generally making the web a better place.

This fall has been especially busy – so much so we’ve neglected to share updates here.


Gabe Karp, 10up’s Business Director in Europe, will be speaking next week at Web Summit 2017 in Lisbon. The “largest tech conference in the world,” WebSummit brings 25 different conferences together in one physical space over 4 days. Gabe will be part of a Marketing Technology panel in the Growth Summit track on Nov. 7th

10up is excited to sponsor Klein News Innovation Camp (formerly Barcamp News Innovation), an open, unconference style event being held at Temple University in Philadelphia on November 4th, focused on the future of news and how we can improve communities and conversations across the web. I’m looking forward to participating personally – let me know on twitter (@jeckman) if you’ll be there as well.

We will also be sponsoring WordCamp Seattle (November 4th-5th 2017). VP of Client Strategy Grant Landram and Director of Systems Engineering Zach Brown will be there along with a number of our pacific northwest area clients and colleagues, and would love to meet people interested in working with or for 10up.

Our VP of Engineering, Vasken Hauri, will be speaking that same weekend at WordCamp Riverside, on the ways ElasticPress can be used to improve WordPress site performance and functionality, in “ElasticPress: It’s More Than Just Search!

Web Engineer Ivan Kristianto is the lead organizer of WordCamp Jakarta – also November 4th – and Web Engineer Dreb Bits will be speaking on what it means to use WordPress as a “headless” CMS. Check out their Wapuu, Wapuu Ondel-Ondel:


Lead Audience & Revenue Strategist Ben Ilfeld was recently a guest on the WP Tonic podcast, discussing how organizations can better leverage Google Analytics.

10up sponsored WordCamp NYC 2017 (as we have every year since 2012). Speakers included Lead Web Engineer Adam Silverstein on “JavaScript in WordPress Core: Past, Present, and Future,” Director of Platform Experience (and WordPress Lead Developer) Helen Hou-Sandí on a “Women in WordPress” panel, and me on “Dear Firstname Lastname: Content Targeting & Personalization in WordPress.”

Senior Web Engineer Pete Nelson spoke at WordCamp Austin on Custom Roles and Capabilities in WordPress.

Front End Engineer Daine Mawer spoke at WordCamp Cape Town on Automating WordPress, including a demonstration of a voice-controlled deployment to a VPS using DeployBot and Amazon Alexa.

Senior User Experience Designer Sarah James spoke at WordCamp Phoenix on “The Art of Creating Custom Admin Interfaces”

Senior Web Strategist Christopher Lauzon spoke at WordCamp Philly on “That Time I Blew Up Someone’s Site and Other Ways to Avoid Disaster”

Senior User Experience Designer Melissa Vander Wilt was a guest speaker at a Portland State content strategy class.

Director of Strategic Opportunities Phil Crumm spoke about Headless WordPress in the technical innovation track at the second annual WPEngine Summit for Digital Innovators.

https://10up.com/blog/2017/klein-news-innovation-camp-web-summit-wordcamps-and-other-recent-10up-talks/feed/ 0
Supporting the first WordCamp for Publishers https://10up.com/blog/2017/wordcamp-for-publishers/ https://10up.com/blog/2017/wordcamp-for-publishers/#respond Mon, 14 Aug 2017 18:00:41 +0000 https://10up.com/?p=18800 The first WordCamp curated for publishers begins Thursday in Denver, and features sessions for engineering, product, and editorial teams at news rooms big and small.

With our mission to make a better web for content creators, it’s no surprise that many of our clients are publishers, from storied giants like The New York Times and Time Inc to breakout digital voices like 9to5mac and Uproxx. Combined with our committed support for open platforms like WordPress, we’re proud Gold Sponsors of WordCamp for Publishers, the highest tier publicly offered.

I’ll be participating in the event along with fellow 10uppers Ben Ilfeld, Whitney Yadrich, Jay Moore, and Derrick Koo. We’re eager to learn, and eager to share: four of us will present at the event.

Ben will apply his experience as an Audience & Revenue Strategist to his talk, Destructive Ad Tech and Practical Solutions. Embracing advertising as the lifeblood of modern media, Ben posits that the current ad landscape undermines publisher values and abuses audiences. Acknowledging the financial challenges for publishing at scale, Ben will offer two counter strategies and techniques for implementing them in WordPress.

Whitney and Jay will bring the scars of project and account management to their workshop: The Project Scope Will Change. Here’s How You Make It a Tolerable – If Even Pleasant – Experience. Change requests can increase project tension and turn a client / vendor relationship on its head. Whitney and Jay will argue that they don’t have to, as they illustrate how to navigate changing requirements and expectations using examples from a multitude of projects.

You’ll find nostalgia, futurism, and practical tips in my talk: Distribute All The Things: WordPress & The Era of Multiple Content Channels. In the era of Google AMP, Facebook Instant Articles, Apple News, Alexa, and RESTful APIs, distributing digital content no longer means “build a website.” I’ll argue that publishers need a strategy to thrive on a multichannel web, positioning WordPress as a platform built for where the web is going. I’ll also join WIRED’s Jake Spurlock for Q&A, after his connected follow on session focused on monetizing new channels.

If you plan to attend, track down our sponsor table, and let us know in advance by dropping a message in the comments, mentioning us on Twitter, or leaving a note on our Facebook page.

https://10up.com/blog/2017/wordcamp-for-publishers/feed/ 0
Engineering challenges: Caching under high load https://10up.com/blog/2017/engineering-challenges-caching/ https://10up.com/blog/2017/engineering-challenges-caching/#respond Tue, 25 Jul 2017 16:32:23 +0000 https://10up.com/?p=18630 What’s wrong with this piece of code?

function get_foo() {
	$cache_key = 'fookey';

	$data = wp_cache_get( $cache_key );
	if ( false === $data ) {
		sleep( 10 );
		$data = 'foodata';
		wp_cache_add( $cache_key, $data, '', HOUR_IN_SECONDS );

	return $data;

Under low server load, not much. A cache miss like this typically results in a single recalculation of data, with the majority of visitors getting cache hits when reaching that function.

However, under heavier loads (E.g.; 1,000+ requests per minute), data will be recalculated multiple, simultaneous times for each request. Before one request can be completed and stored in the cache, additional requests have come in, triggering duplicate calculations. This is known as cache stampeding, or the thundering herd problem.

If the data calculation requires calling a third-party service, as seen in the following example, at best the rate limit is reached, but at worst a denial of service takes down or severely restricts access to the API, setting off alarms for support engineers:

function get_foo() {
	$cache_key = 'fookey';
	$data = wp_cache_get( $cache_key );

	if ( false === $data ) {
		$response = wp_remote_get( 'http://example.com/some_api', array(
			'timeout' => 10
		) );

		// For the sake of the example, we're skipping the part where we check for a 200 response.
		$data = json_decode( $response['body'], true );
		wp_cache_add( $cache_key, $data, '', HOUR_IN_SECONDS );

	return $data;

This code might seem acceptable, given that the worst case scenario results in a visitor waiting ~10s+ for their request to process. This is true, under some scenarios.

When is it true?

Consider a hypothetical website that only calls get_foo() on its homepage; if the right kind of caching is in place, there is little to worry about.

By using a caching reverse proxy in front of the app server, which only allows one synchronous request per resource, along with stale caching data for handling other requests, there is no likely issue.

For those who wear a DevOps hat, you’ll probably recognize these two solutions:
Varnish + grace mode and NGINX + proxy_cache_use_stale.

However, in the case where get_foo() isn’t limited to the homepage, the caching reverse proxy won’t help. Instead, it will send one request through for each URL, resulting in an overwhelmed server.

Here are several solutions to the above problem, each of which can be applied on a case-by-case basis:

  1. Do nothing. This is a valid approach for the majority of sites on the internet. Unless serving more than a dozen requests a minute, the amount of visitors affected by this issue approaches zero.
  2. Out of band scheduled updating via WP-CLI.
If it needs to get more complicated, you can also use wp_cron 
(just remember the drawbacks here), or add time-based segregation in your script ( 0 === date('i') % $interval )
 You modify get_foo to always recache when you call from WP_CLI.
function get_foo() {
	$cache_key = 'fookey';
	$data      = wp_cache_get( $cache_key );
	if ( false === $data || defined( 'WP_CLI' ) ) {
		sleep( 10 );

		$data = 'foodata';
		wp_cache_add( $cache_key, $data );

		return $data;
  1. Out of band triggered request. Similar to above, this solution always serves cached data using TechCrunch WP Asynchronous Tasks (co-developed by 10up) to make a request without affecting the visitor experience.
  2. Mutex, which adds a second cache key—’fookey_updating’—when ‘fookey’ is not present or up to date. It either forces the other requests to sleep or to return a stale version of the data.
function get_foo() {
	$cache_key          = 'fookey';
	$cache_key_stale    = 'fookey_stale';
	$cache_key_updating = 'fookey_updating';
	$data               = wp_cache_get( $cache_key );

	if ( false === $data ) {
		$is_updating = ( false !== wp_cache_get( $cache_key_updating );
		$data        = wp_cache_get( $cache_key_stale );
		if ( ! $is_updating || false === $data ) {
			wp_cache_add( $cache_key_updating, true, '', 30 ); // We give this entry an expire time so that the cache key is cleared if the request was terminated.
			sleep( 10 );
			$data = 'foodata';
			wp_cache_add( $cache_key, $data, '', HOUR_IN_SECONDS );
			wp_cache_replace( $cache_key_stale, $data );
			wp_cache_delete( $cache_key_updating );

	return $data;
  1. Re-caching, which works for a widget included on all site pages.
// example.com is a third-party site; 10upclient.com is the production site
function get_foo() {
	$cache_key = 'fookey';
	$data      = wp_cache_get( $cache_key );

	if ( false === $data ) {
		$response = wp_remote_get( 'http://10upclient.com/wp-admin/admin_ajax.php?action=some_api', array( 'timeout' => 10 ) );
		$data     = json_decode( $response['body'], true );
		wp_cache_add( $cache_key, $data, '', HOUR_IN_SECONDS );

	return $data;

add_filter( 'wp_ajax_nopriv_some_api', function () {
	$response = wp_remote_get( 'http://example.com/some_api', array( 'timeout' => 10 ) );

	// For the sake of the example, we're skipping the part where we check for a 200 response.
	$data = json_decode( $response['body'], true );

	return $data;
} );

By forcing a bottleneck code to exist for http://10upclient.com/wp-admin/admin_ajax.php?action=some_api, Varnish/NGINX, stale content will be returned for that resource, and only one request will be allowed at a time to that endpoint.

  1. Edge Side Includes (ESI). Similar to #5, ESI dynamically generates the HTML for a widget from an endpoint. Added for posterity, ESI is not recommended for WordPress, as it requires a call through the full WordPress stack for each page section, potentially turning one request into many. WordPress isn’t architected to serve fragments of pages by default, though it can be customized to do so.

This flowchart can be used to identify the best solution for each use case. If you enjoy unpacking complex engineering challenges like these, consider applying to 10up.

https://10up.com/blog/2017/engineering-challenges-caching/feed/ 0
Sponsoring WordCamp DC https://10up.com/blog/2017/sponsoring-wordcamp-dc/ https://10up.com/blog/2017/sponsoring-wordcamp-dc/#respond Fri, 14 Jul 2017 16:25:38 +0000 https://10up.com/?p=18771 As one of the Washington, DC metro area’s local 10uppers, I’m proud to share that 10up is a Silver tier sponsor of this weekend’s WordCamp DC.  With our diverse client portfolio including government, political, nonprofit, and national news organizations, an event celebrating open platforms and a better web in Washington, DC was a natural fit for our support.

If you’re attending, be sure to catch Lead Engineer Adam Silverstein speaking on Friday afternoon, in his session, Ten tips for securing your WordPress JavaScript. Pick up our postcard on the swag table, and find Adam and me roaming the event: ask us about working at 10up, hiring 10up for your project, and our newest hosted solution, ElasticPress.io.

https://10up.com/blog/2017/sponsoring-wordcamp-dc/feed/ 0
Operation LiftUp: Welcome Lift UX to 10up https://10up.com/blog/2017/10up-acquires-lift-ux/ https://10up.com/blog/2017/10up-acquires-lift-ux/#respond Tue, 11 Jul 2017 16:28:21 +0000 https://10up.com/?p=18736

We’re delighted to announce that after nearly one year of discussion and due diligence, 10up has completed an acquisition of Lift UX: a boutique, distributed, Emmy-nominated agency that specializes in making user experience design driven websites powered by WordPress. The Lift team, including its founding partners, Chris Wallace and Brad Miller, join 10up effective immediately.

Founded as a boutique digital creative shop in 2009, Lift has delivered web projects for clients like Frito-Lay, The Next Web, eBay, GoDaddy, and Disney. Lift earned acclaim when a “second screen” experience built for AMC’s Walking Dead was nominated for an Emmy Award in the interactive program category in 2012. Their work earn a second nomination in 2015 for Mad Men: The Fan Cut. Among their innovations, Lift built and sold a WordPress themes shop (UpThemes), and started a career center for distributed companies, RemoteJobs.com. They recently launched CampusInsiders.com, a project spotlighted by Automattic’s WordPress.com VIP program; the project earned Lift an invitation to become an official VIP agency partner.

As 10up’s President & Founder, I am elated to welcome this outstanding team, award recognized portfolio, and client roster to the 10up family. This acquisition accelerates our growth in Experience Design, adding executive-tier design leadership and enriching our growing portfolio of design stories. It represents a special opportunity for all parties to go further and faster as we partner with clients to make a better web.

Chris Wallace, Partner & Creative Director at Lift, will become 10up’s Vice President of Experience Design. His finely crafted design work, hands on front end build experience, and engagement with design and developer communities uniquely positions him to be 10up’s first exclusively design focused executive. He will report to Chief Executive Officer John Eckman.

Brad Miller, Partner & Executive Director at Lift, will assume the title Vice President & Associate Director of Client Strategy. Brad will be applying his winning track record building accounts and relationships, as he joins our Client Strategy team. He will report to Vice President of Client Strategy Grant Landram, partnering with accounts leadership to advance design opportunities. A fellow business owner and entrepreneur, I’m looking forward to the fresh perspective Brad will add to 10up’s executive leadership.

Also joining 10up: Christian Chung, Lift’s Director of Technology, and Anthony Garand, Front End Developer at Lift. They will come aboard in Senior Web and Front End Engineering positions, respectively, providing continuity for incoming clients and further bolstering our talented engineering team. In reviewing their work as part of due diligence, our Director of Engineering called their work, “impressive” – and I agree.

Lift’s leadership adds to 10up’s existing Experience Design team: two Visual Designers, four User Experience Designers – including User Experience Director Taylor Dewey, and two Audience & Revenue Strategists, to say nothing of our many UX and design oriented Front End Engineers, Client Strategists, and Project Managers. 10up is committed to offering its clients best-in-class expertise and execution across the full spectrum of content-centric digital experiences.

We also remain firmly committed to our engineering and strategic services, and to our many clients and partners who look for 10up to complement their own design competencies or offerings. Adding more experience design expertise to our company DNA enhances our empathy and ability to collaborate with design partners in an era of interactive, responsive design where divisions between “design” and “engineering” have eroded. (And it doesn’t hurt to know that we can pinch hit!)

It takes a special kind of chemistry and alignment for a deal like this to work. We often explore opportunities to join forces, and pass on most. In our conversations with Lift, it became apparent that their client, team, and community centricity, expertise with our preferred platforms, and palpable passion for digital creation were almost eery in their alignment with 10up. We share the same core values: service, craftsmanship, creativity, and innovation. Brad and Chris are thoughtful, ambitious, honest, and humble leaders. If working closely on this deal for months is any indication, they will be a pleasure to work with.

I can’t wait to see what we make together.

https://10up.com/blog/2017/10up-acquires-lift-ux/feed/ 0
Restricted Site Access for WordPress optimized for multisite https://10up.com/blog/2017/restricted-site-access-wordpress-multisite/ https://10up.com/blog/2017/restricted-site-access-wordpress-multisite/#comments Fri, 16 Jun 2017 16:00:52 +0000 https://10up.com/?p=18671 We’ve released a major update to Restricted Site Access, our popular WordPress plugin that intelligently limits website access. Designed to keep unwanted visitors out of staging, test, and private sites, the plugin is active on more than 20,000 websites and has a 5 star rating.

Restricted Site Access 6.0 adds full support for WordPress network (multisite) installations. Network administrators can enforce restriction rules across the entire network, or set default restriction rules that are applied as new sites are added. If you have a network of private blogs or internal sites, or need time to configure new sites in your network before taking them live, this is the update you’ve been waiting for.

There are a handful of other refinements:

  • Administrators are proactively warned about potential compatibility issues when page caching is enabled. This will alleviate a common point of confusion, since some page caching solutions will deliver content before the plugin can analyze the visitor.
  • We’ve modernized the development workflow with Grunt to facilitate internal development and open source contributions.
  • We’ve tweaked and updated some code and user-facing language throughout.

The plugin is up to date on Github and the WordPress.org repository. If you need help building, protecting, or managing a network of sites, get in touch.

https://10up.com/blog/2017/restricted-site-access-wordpress-multisite/feed/ 1
Estimates and estimation https://10up.com/blog/2017/estimates/ https://10up.com/blog/2017/estimates/#respond Thu, 08 Jun 2017 16:00:41 +0000 https://10up.com/?p=18637

“In preparing for battle I have always found that plans are useless, but planning is indispensable.”
Dwight D. Eisenhower

Why we estimate

Suppose you’re preparing for a trip and deciding which suitcase to take. You have a small suitcase that you like because it’s easy to carry and will fit into an airplane’s overhead storage bin. You also have a large suitcase, which you don’t like because you’ll have to check it in and then wait for it at baggage claim, lengthening your trip. You lay your clothes beside the small suitcase, and it appears that they will almost fit. What do you do? You might try packing them very carefully, not wasting any space, and hoping they all fit. If that approach doesn’t work, you might try stuffing them into the suitcase with brute force, sitting on the top and trying to squeeze the latches closed. If that still doesn’t work, you’re faced with a choice: leave a few clothes at home or take the larger suitcase. —Steve McConnell, Software Estimation: Demystifying the Black Art

As an engineer, nothing pleases me more than rolling up my sleeves and writing code. But before doing that, a sense of how to approach a task and the required resources (people, time, software licenses, third-party API access) need to be determined. These details support clear project expectations, which are foundational to the great client experiences we strive to create. Estimates, give all project stakeholders—internal and external—a chance to agree on a few key things before work is begun:

  • That we understand what is being asked for;
  • That we have a plan to efficiently deliver quality results;
  • That we’ve asked (and answered) all project team questions;
  • That we’ve considered all the risks, edge cases, and alternatives;
  • That we’ve considered the effects on usability, accessibility, and SEO;
  • That the available budget and desired timeline support the approach.

Quite often, larger estimates become the centerpiece at the negotiation table, kicking off a process of scope narrowing, prioritization, and concession. At 10up, we create two estimate documents for every project or large feature: a Qualitative and a Quantitative document.

The Qualitative Estimate

An estimate is an artifact. But it stands at the end of an estimation process. Here at 10up, the Qualitative Estimate document is where most of the process happens, wholly inside of Google Docs for easy collaboration; it’s rare for an estimate to be the work of a single contributor. The resulting document should be born of friendly arguments, constructive collaboration, and the benefits of Team 10up’s diverse skills and backgrounds.

The Qualitative Estimate provides two things:

  • During the estimation process, it gives the team a space to flesh out the approach.
  • Once complete, it provides internal stakeholders with proof of a workable approach.

The Qualitative Estimate requires more detail than a proposal or pitch might include. Each line item needs to be well-thought out and accompanied by specific details that might include:

  • Restating the task in the writer’s own words;
  • Identifying the client’s underlying business reason for the task;
  • Questions and answers from the Discovery process, calls, or Basecamp threads;
  • Our planned approach to the task including libraries, major components, and a high-level overview of how the code will work.

The amount of detail is relative to the task. There’s little sense in writing a three-page explanation around a clickable site logo. A more important component or feature demands considerable detail to back up the high number of hours it is anticipated to take.

The end goal of this process is to quickly narrow what Steve McConnell calls The Cone of Uncertainty. As a project progresses from raw ideas to a finished product, each step moves the team closer to an understanding of how much time the project will take. It’s preferable to work with a client early in a project to ask for more hours than when close to launch. By then, the client has already scheduled training, bought advertising, and/or spent the rest of the budget elsewhere. More details and up-front planning contribute to estimate certainty and help everyone manage expectations.

The Cone of Uncertainty (McConnell)

The Quantitative Estimate

The Quantitative Estimate is a more traditional spreadsheet. It’s broken out into major groups of functionality, with room to add line items describing the individual tasks within those bigger units. Each line item challenges the estimator to consider the efforts for:

  • Front-end engineering;
  • Back-end engineering (including Systems);
  • Design;
  • QA and code review.

Subtotals and totals are computed automatically, giving immediate feedback on the impact a task has on the whole project. This instant feedback loop breeds experimentation, estimating different approaches to see how the alternatives affect the grand total. This is important information to share with the project team so that different options can be presented to the client.

A rule of thumb for QA/Code Reviews at 10up is to start with 20% of the sum of the other disciplines, rounded up to the next quarter-hour. So, a task needing four hours of front-end engineering, 12 hours of back-end engineering, and one hour of design would be calculated by 17.0 * .2 = 3.4 hours, rounded up to 3.5 hours. But that’s just a starting point; the estimator can raise or lower that number to reflect the complexity of the task.

Distribution of relative effort overruns (van Genuchten)

Tasks often end up taking more time than expected. There is no shortage of platitudes about this: Take your estimate, double it, then double it again; Multiply every number by 1.5; Multiply by pi and convert to the next time magnitude (one day = 3.14 weeks!). But to cite specifics, a study (Jenkins, Naumannm, and Whetherbe, referenced by Michiel van Genuchten) noted that, of 72 projects surveyed, “the average effort overrun was 36%.”

The Programmer Time Translation Table by Anders Abel tries to map programmers’ initial estimates to a more realistic amount of time, taking into account common issues that occur when working on a task. Note how important it is to account for time spent outside a text editor or IDE.

The last line of that chart is important: a huge task, one expected to take more than a couple days’ work, is too big to estimate with a lot of certainty. In order to narrow that Cone of Uncertainty, the task needs to be broken down into smaller line items.

Steve McConnell advocates a very scientific approach to estimating. 10up embraces a more agile and nimble workflow than this more rigorous method can accommodate, but the first half of his book Software Estimation: Demystifying the Black Art is full of wisdom on the whys and hows of estimates. It includes a list of things engineers tend to forget to account for when estimating:

Software-Development Activities Commonly Missing from Software Estimates (McConnell)

By developing estimates through qualitative and quantitative processes, we’re able to provide more confident project pricing for our clients, minimize surprise budget overruns, and avoid the temptation to over-promise.

Further Resources

https://10up.com/blog/2017/estimates/feed/ 0
Get to know New Relic Reporting for WordPress https://10up.com/blog/2017/new-relic-wordpress/ https://10up.com/blog/2017/new-relic-wordpress/#respond Wed, 31 May 2017 16:04:24 +0000 https://10up.com/?p=18614 New Relic is a SaaS product that offers application performance monitoring (APM), which provides developers with real-time data for use in proactive diagnostics as well as debugging. This data—including basic information about WordPress hooks, plugins, and themes—can be queried and visualized using the New Relic Insights dashboard.

Seeing an opportunity to maximize the utility of APM and Insights, we created New Relic Reporting for WordPress, which supplements out-of-the-box data collection with additional WordPress-specific information.

New Custom Attributes

New Relic APM’s “transaction traces” are the foundation for its detailed insight into application performance. These traces record each step (transaction) along the path to satisfy an application request, such as a website page request. Each recorded transaction includes a number of attributes—metadata about the transaction—such as its time and date. Our plugin adds and extends attributes for the transaction data logged in New Relic, to aid debugging and performance analytics.

While our technical documentation is more detailed, at the high level, our plugin adds the following transaction attributes:

  • User data. Whether a logged in WordPress user was executing the transaction, and if so, the ID of the user.
  • Post ID. If a single post was being requested, the ID of that post.
  • Template. If a theme template was being requested, the file path for the template.
  • Theme. The name of the theme in use at the time of the transaction.
  • Request type. Whether the transaction was made as part of a standard web request (most common), an AJAX request, or a CLI request. New request types can be added using a filter (wp_nr_request_type).
  • Runtime of async tasks. Tracks the runtime of Gearman async tasks, building on our WP-Gears work.

Our plugin also improves reporting for some existing, key attributes:

  • Transaction name. Adds more recognizable names for common WordPress application requests, e.g. website “Front Page” or admin “Dashboard”, in lieu of generic transaction names like “index.php”.
  • Error messages. Log errors/notices for the current transaction with a new PHP function.

More granular debugging

The additional custom attributes we attach to transaction traces empowers engineers to better diagnose unusual site behavior. As an example, let’s look at how our plugin can assist in debugging a common scenario: complaints by an editor that the site is loading slowly.

When someone reports slow page loads, we can query New Relic Insights for slow transactions using New Relic’s ‘duration’ attribute. Because our plugin adds a custom attribute identifying the WordPress user to each transaction, the engineer can investigate whether the performance is isolated to logged in users, and even determine whether it’s localized to specific users. We can include the WordPress user as a column in the transaction results, or refine the query to be limited to users who are (or are not) logged in, even restricting results to a specific user ID (perhaps the user who reported the problem).

In the below screenshot, we queried for some important attributes, including duration, for all transactions by WordPress user ID 53, ordered reverse chronological by the timestamp (date and time of transaction) attribute.

Pinpoint trends before they become problems

While duration is a standard New Relic attribute, query results are, by default, limited to attributes that make it difficult to correlate slow times with specific site usage patterns in WordPress. By adding details like the category name to the transaction name attribute, New Relic can report on load times for category pages, enabling developers to more quickly recognize patterns associated with atypical performance before they become major issues.

Queries like this one—the average duration for categories—can be embedded in the New Relic Insights dashboard, keeping developers up-to-date with real-time data at a glance. By adding warning and critical performance thresholds, support engineers can actively track site performance to proactively remedy trends before they affect site visitor experiences.

Learn more about, or download, New Relic Reporting for WordPress from GitHub or WordPress.org.

https://10up.com/blog/2017/new-relic-wordpress/feed/ 0
10up at SyntaxCon https://10up.com/blog/2017/syntaxcon/ https://10up.com/blog/2017/syntaxcon/#respond Fri, 12 May 2017 12:49:15 +0000 https://10up.com/?p=18589 I’m excited to be presenting “An Introduction to Test-Driven JavaScript Development” at Syntax Code and Craft Conference on May 18. SyntaxCon, held in Charleston, SC, is a multi-day, full stack code conference for developers and engineers. My talk introduces the concept of test-driven development (TDD) when working with JavaScript, highlights its benefits, clarifies some common misconceptions, and provides examples of how to implement TDD into your everyday workflow.

https://10up.com/blog/2017/syntaxcon/feed/ 0
Introducing WP Docker https://10up.com/blog/2017/wp-docker/ https://10up.com/blog/2017/wp-docker/#comments Thu, 27 Apr 2017 17:11:59 +0000 https://10up.com/?p=18568 Back in 2013, 10up introduced Varying Vagrant Vagrants (VVV), a project led by then 10upper Jeremy Felt. One of the first popular WordPress development environments based on Vagrant, VVV has since been moved out of 10up’s GitHub and into its own, where it continues to thrive as a community-led project.

Now, Docker and container-based server architectures have emerged as powerful tools for creating and managing development environments. Last year, we partnered with Joyent to release a scalable, production-ready Docker environment for WordPress. Today, we’re proud to release WP Docker: an open source Docker configuration optimized for local WordPress development.

Why WP Docker?

While still viable, VVV, Vagrant, and Virtual Box/Hyper-V take up extreme disk space and are slow to provision, start up, and SSH into. Because of this, engineers tend to use one “mega” VVV install for all of their development websites. This workflow poses a number of problems: system service version and configuration “normalization” across all projects (i.e. PHP 7 on everything when some projects run PHP 5.6 in production), and legacy clutter (i.e. old websites and system packages undeleted).

WP Docker addresses these shortcomings and provides greater flexibility in environment creation and distribution. Since Docker starts up extremely quickly, the environment is conducive to a “one site per environment” rule. Docker Compose makes it easy to swap system package versions and configurations. An engineer can easily use PHP 5.6 for one environment and PHP 7 for another. Docker Compose also simplifies adding new dependencies (e.g. MongoDB). As an added bonus, WP Docker includes Elasticsearch, so ElasticPress works out-of-the-box.

Our lightweight WP Docker project includes:

  • PHP7
  • MariaDB
  • Elasticsearch
  • Gearman
  • Memcached

That said, we don’t believe in “one size fits all” engineering solutions, and that applies to development environments. 10up still uses VVV for quite a few projects. We think that WP Docker offers another powerful option for developing WordPress applications locally, and we are excited to share it with the open source community.

https://10up.com/blog/2017/wp-docker/feed/ 10