{"id":15039896,"url":"https://github.com/automattic/cheeztest","last_synced_at":"2025-07-02T00:07:33.960Z","repository":{"id":49154345,"uuid":"3398231","full_name":"Automattic/cheeztest","owner":"Automattic","description":"Adding some LOLs to your server-side WordPress A/B testing. Plays nice with Batcache.","archived":false,"fork":false,"pushed_at":"2023-01-16T23:18:58.000Z","size":41,"stargazers_count":28,"open_issues_count":1,"forks_count":8,"subscribers_count":118,"default_branch":"master","last_synced_at":"2025-06-25T22:56:45.630Z","etag":null,"topics":["wordpress","wordpress-plugin","wpvip-plugin"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Automattic.png","metadata":{"files":{"readme":"readme.txt","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-09T15:31:02.000Z","updated_at":"2024-02-28T14:52:04.000Z","dependencies_parsed_at":"2023-01-22T05:48:44.279Z","dependency_job_id":null,"html_url":"https://github.com/Automattic/cheeztest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Automattic/cheeztest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fcheeztest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fcheeztest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fcheeztest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fcheeztest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Automattic","download_url":"https://codeload.github.com/Automattic/cheeztest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Automattic%2Fcheeztest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263052433,"owners_count":23406106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["wordpress","wordpress-plugin","wpvip-plugin"],"created_at":"2024-09-24T20:43:57.866Z","updated_at":"2025-07-02T00:07:33.829Z","avatar_url":"https://github.com/Automattic.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"  ______   __                 ________           __     \n /      \\ /  |               /        |         /  |    \n/$$$$$$  |$$ |____   ________$$$$$$$$/_______  _$$ |_   \n$$ |  $$/ $$      \\ /        |  $$ | /       |/ $$   |  \n$$ |      $$$$$$$  |$$$$$$$$/   $$ |/$$$$$$$/ $$$$$$/   \n$$ |   __ $$ |  $$ |  /  $$/    $$ |$$      \\   $$ | __ \n$$ \\__/  |$$ |  $$ | /$$$$/__   $$ | $$$$$$  |  $$ |/  |\n$$    $$/ $$ |  $$ |/$$      |  $$ |/     $$/   $$  $$/ \n $$$$$$/  $$/   $$/ $$$$$$$$/   $$/ $$$$$$$/     $$$$/  \n\nCheezTest lets you create and run Batcache-compatible server-side A/B tests in your theme.\n\nA joint LOL by the fine folks I Can Has Cheezburger (http://www.cheezburger.com) and Automattic (http://automattic.com)\n\nMain class from which all A/B tests are inherited. Enables fast setup\nof A/B tests - upon initialization, the basic order of execution is:\nset test name \u003e check if user is qualified to participate \u003e check\nif user has been assigned a segment, and assign if not \u003e assign user\nto group \u003e execute 'action' callback if present.\n\nUser's qualification, segment, and group tests are done in batcache\nso as to ensure correct cache variants are served.\n\nUser's segment is assigned server-side via magic. Mutliple test\nsegments are assigned at once - so if a user is qualified to participate\nin more than one test, all segments are assigned at the same time. When\nsegments need to be set, a small javascript is injected into the \u003chead\u003e\nvia a call to CheezTest::write_segment_cookie(). This javascript\nsets a cookie to retain the segment assigned earlier.\n\nTest case data (name, is_qualified, \u0026 group) are stored in the $active_tests\nstatic hash and made accessible via the 'is_qualified_for', 'get_group_for', and\n'is_in_group' static methods. This enables theme branching via:\n\nif ( CheezTest::is_qualified_for( 'my-example-test' ) {\n    //test-specific stuff goes here\n}\n\n- or -\n\nif ( CheezTest::is_in_group( 'my-example-test', 'my-example-group' ) ) {\n   //group-specific stuff goes here\n}\n\nThe plugin makes use of Batcache’s support for vary_cache_on_function, which saves page variants in a page’s cache and then evaluates which one to serve when the page loads.\n\nIMPORTANT: Since the tests run before Batcache, which in turn runs very early (before theme code is included), only built-in PHP functions and jetpack_is_mobile() can be used when defining tests. Any theme-specific functions will not be available.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomattic%2Fcheeztest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautomattic%2Fcheeztest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautomattic%2Fcheeztest/lists"}