[{"data":1,"prerenderedAt":1153},["ShallowReactive",2],{"blog-\u002Fblog\u002F2026\u002Fthe-new-pesi-pl":3,"blog-project-\u002Fblog\u002F2026\u002Fthe-new-pesi-pl":1050,"i-lucide:link":1149},{"id":4,"title":5,"art":6,"body":7,"date":1033,"description":1034,"draft":1035,"extension":1036,"image":1037,"kind":1038,"meta":1039,"navigation":456,"ogImage":1040,"path":1041,"project":1042,"seo":1043,"slug":1037,"stem":1044,"tags":1045,"translationKey":1048,"updated":1037,"__hash__":1049},"blog_en\u002Fblog\u002F2026\u002Fthe-new-pesi-pl.md","The new pesi.pl – what actually made it faster","\u002Fart\u002Fblog\u002Fnowa-pesi-pl.svg",{"type":8,"value":9,"toc":1020},"minimark",[10,21,30,35,38,41,44,111,115,118,141,144,148,151,205,208,212,215,241,244,247,368,383,386,517,531,534,538,541,544,555,703,723,728,731,734,770,778,782,827,831,834,837,840,844,847,933,940,944,982,986,989,993,1016],[11,12,13,20],"p",{},[14,15,19],"a",{"href":16,"rel":17},"https:\u002F\u002Fpesi.pl",[18],"nofollow","pesi.pl"," is the website of Pesi – the company I work for. Until recently it ran on Laravel, and every change, including every blog post, was pasted in by someone from the front-end or back-end team, not by marketing. That's why I rewrote it in WordPress. Now marketing publishes posts on their own, sees more clearly what to focus on and can follow changes on the site more easily. Along the way the site became much faster. Below I describe what helped the most and what didn't help at all.",[11,22,23],{},[24,25],"img",{"alt":26,"height":27,"src":28,"width":29},"The first screen of pesi.pl on a phone – the old version on the left, the new one on the right",1340,"\u002Fblog\u002F2026\u002Fnowa-pesi-pl\u002Fstrona-glowna-telefon.webp",1608,[31,32,34],"h2",{"id":33},"what-bothered-me-on-the-old-site","What bothered me on the old site",[11,36,37],{},"On the old site I saw a few things I wanted to fix: the menu jumped while the page was loading, some elements went outside the container, and on a phone the page was very long.",[11,39,40],{},"I don't like pages that go on forever – whether it's an article or a list I'm browsing. If I want to scroll down to the footer, why does the author make it hard? The footer has the contact details. If I can't get there, I just give up – and that means a lost client.",[11,42,43],{},"You can see how much shorter the pages are in the full-page screenshots from Lighthouse (phone, 412 px wide, the screen is 823 px tall):",[45,46,47,63],"table",{},[48,49,50],"thead",{},[51,52,53,57,60],"tr",{},[54,55,56],"th",{},"Page",[54,58,59],{},"Before",[54,61,62],{},"After",[64,65,66,78,89,100],"tbody",{},[51,67,68,72,75],{},[69,70,71],"td",{},"Home",[69,73,74],{},"14,553 px (about 18 screens)",[69,76,77],{},"10,058 px (about 12 screens)",[51,79,80,83,86],{},[69,81,82],{},"About us",[69,84,85],{},"10,895 px",[69,87,88],{},"8,330 px",[51,90,91,94,97],{},[69,92,93],{},"References",[69,95,96],{},"14,686 px",[69,98,99],{},"8,914 px",[51,101,102,105,108],{},[69,103,104],{},"Websites",[69,106,107],{},"12,566 px",[69,109,110],{},"11,852 px",[31,112,114],{"id":113},"how-i-worked-with-claude-code","How I worked with Claude Code",[11,116,117],{},"Claude Code wrote the code of the new version – I didn't really change anything in the code myself. My part looked like this:",[119,120,121,129,135],"ul",{},[122,123,124,128],"li",{},[125,126,127],"strong",{},"the plan"," – the hardest part was thinking the whole thing through so that I wouldn't repeat the mistakes from the Laravel version,",[122,130,131,134],{},[125,132,133],{},"the decisions"," – which grids with many elements should become carousels on phones and tablets, how big each element should be, where it should go, what kind of component it is and whether we'll use it in other places; plus removing unused icons and having fewer elements on the home page,",[122,136,137,140],{},[125,138,139],{},"the checks"," – I spotted everything that didn't match visually and suggested changes to the look. Everything else I handed over to Claude Code.",[11,142,143],{},"With Claude Code, taking care of the look of the site was much easier. What took a lot of time was moving the whole portfolio and all the blog posts so that they kept their previous look. It worked, and now the person who writes an article can also mark who the author is. It's simple and intuitive, so I'm happy – both with myself and with Claude Code.",[31,145,147],{"id":146},"the-starting-point-about-2-mb-of-javascript","The starting point: about 2 MB of JavaScript",[11,149,150],{},"On a phone, the old site loaded about 2 MB of JavaScript (sent over the network, after compression). Most of it wasn't the site's own code:",[45,152,153,163],{},[48,154,155],{},[51,156,157,160],{},[54,158,159],{},"Script",[54,161,162],{},"Size",[64,164,165,173,181,189,197],{},[51,166,167,170],{},[69,168,169],{},"reCAPTCHA – loaded right after opening the page",[69,171,172],{},"880 kB",[51,174,175,178],{},[69,176,177],{},"analytics and marketing tools",[69,179,180],{},"569 kB",[51,182,183,186],{},[69,184,185],{},"the Lottie animation player from a CDN",[69,187,188],{},"379 kB",[51,190,191,194],{},[69,192,193],{},"the site's code (Alpine.js, Splide carousels and the rest)",[69,195,196],{},"139 kB",[51,198,199,202],{},[69,200,201],{},"jQuery",[69,203,204],{},"89 kB",[11,206,207],{},"On a phone, the new version loads 35–39 kB of JavaScript. There's no jQuery, no Alpine.js and no carousel library – just a dozen small scripts, and each one loads only where it's needed.",[31,209,211],{"id":210},"heavy-things-only-when-theyre-needed","Heavy things only when they're needed",[11,213,214],{},"You can't remove everything: the form needs reCAPTCHA, and the home page has 3D cubes. But you can change the moment when they load:",[119,216,217,223,229,235],{},[122,218,219,222],{},[125,220,221],{},"reCAPTCHA"," loads the first time someone uses the form, not when they open the page.",[122,224,225,228],{},[125,226,227],{},"The 3D cubes"," are a normal image at first – it's the largest element on the first screen (LCP). The WebGL scene (113 kB after compression) loads after the page has loaded, only on wider screens, and not when someone has reduced motion or data saving turned on.",[122,230,231,234],{},[125,232,233],{},"The menu animations"," (Lottie) load only when you hover over the menu.",[122,236,237,240],{},[125,238,239],{},"A YouTube video"," is just a thumbnail at first – the player loads after a click.",[11,242,243],{},"The cubes deserve a few more sentences. They are Pesi's three pillars and the first thing you see when you open the site. On the old site they were a static image – nothing moved. I wanted to bring them to life without slowing the site down. Today you can do that with Claude Code, but it wasn't easy: rotating the cubes in Three.js, setting them up the way they should stand, optimising the loading and placing them correctly on the page took 2–3 hours of talking to AI – just about this one element.",[11,245,246],{},"The idea is the same every time. This is how reCAPTCHA can load the first time someone uses the form (it's a simplified example, not the code from the site):",[248,249,254],"pre",{"className":250,"code":251,"language":252,"meta":253,"style":253},"language-js shiki shiki-themes github-light github-dark","\u002F\u002F the reCAPTCHA script only on the first focus in the form\nform.addEventListener('focusin', () => {\n  const script = document.createElement('script')\n  script.src = 'https:\u002F\u002Fwww.google.com\u002Frecaptcha\u002Fapi.js?render=SITE_KEY'\n  script.async = true\n  document.head.append(script)\n}, { once: true })\n","js","",[255,256,257,266,294,321,333,344,356],"code",{"__ignoreMap":253},[258,259,262],"span",{"class":260,"line":261},"line",1,[258,263,265],{"class":264},"sqY6-","\u002F\u002F the reCAPTCHA script only on the first focus in the form\n",[258,267,269,273,277,280,284,287,291],{"class":260,"line":268},2,[258,270,272],{"class":271},"sVt8B","form.",[258,274,276],{"class":275},"sScJk","addEventListener",[258,278,279],{"class":271},"(",[258,281,283],{"class":282},"sZZnC","'focusin'",[258,285,286],{"class":271},", () ",[258,288,290],{"class":289},"szBVR","=>",[258,292,293],{"class":271}," {\n",[258,295,297,300,304,307,310,313,315,318],{"class":260,"line":296},3,[258,298,299],{"class":289},"  const",[258,301,303],{"class":302},"sj4cs"," script",[258,305,306],{"class":289}," =",[258,308,309],{"class":271}," document.",[258,311,312],{"class":275},"createElement",[258,314,279],{"class":271},[258,316,317],{"class":282},"'script'",[258,319,320],{"class":271},")\n",[258,322,324,327,330],{"class":260,"line":323},4,[258,325,326],{"class":271},"  script.src ",[258,328,329],{"class":289},"=",[258,331,332],{"class":282}," 'https:\u002F\u002Fwww.google.com\u002Frecaptcha\u002Fapi.js?render=SITE_KEY'\n",[258,334,336,339,341],{"class":260,"line":335},5,[258,337,338],{"class":271},"  script.async ",[258,340,329],{"class":289},[258,342,343],{"class":302}," true\n",[258,345,347,350,353],{"class":260,"line":346},6,[258,348,349],{"class":271},"  document.head.",[258,351,352],{"class":275},"append",[258,354,355],{"class":271},"(script)\n",[258,357,359,362,365],{"class":260,"line":358},7,[258,360,361],{"class":271},"}, { once: ",[258,363,364],{"class":302},"true",[258,366,367],{"class":271}," })\n",[11,369,370,371,374,375,378,379,382],{},"Unlike ",[255,372,373],{},"focus",", ",[255,376,377],{},"focusin"," bubbles up the tree, so one listener on the form catches focus in every field. ",[255,380,381],{},"{ once: true }"," removes the listener after the first call, so the script is added only once.",[11,384,385],{},"The 3D scene works in a similar way – it loads only when all the conditions are met:",[248,387,389],{"className":250,"code":388,"language":252,"meta":253,"style":253},"\u002F\u002F 782 px – from this width WordPress block columns sit side by side\nconst wide = matchMedia('(min-width: 782px)').matches\nconst calm = matchMedia('(prefers-reduced-motion: reduce)').matches\nconst saveData = navigator.connection?.saveData === true\n\nif (wide && !calm && !saveData) {\n  addEventListener('load', () => import('.\u002Fcubes.js'), { once: true })\n}\n",[255,390,391,396,417,435,452,458,482,511],{"__ignoreMap":253},[258,392,393],{"class":260,"line":261},[258,394,395],{"class":264},"\u002F\u002F 782 px – from this width WordPress block columns sit side by side\n",[258,397,398,401,404,406,409,411,414],{"class":260,"line":268},[258,399,400],{"class":289},"const",[258,402,403],{"class":302}," wide",[258,405,306],{"class":289},[258,407,408],{"class":275}," matchMedia",[258,410,279],{"class":271},[258,412,413],{"class":282},"'(min-width: 782px)'",[258,415,416],{"class":271},").matches\n",[258,418,419,421,424,426,428,430,433],{"class":260,"line":296},[258,420,400],{"class":289},[258,422,423],{"class":302}," calm",[258,425,306],{"class":289},[258,427,408],{"class":275},[258,429,279],{"class":271},[258,431,432],{"class":282},"'(prefers-reduced-motion: reduce)'",[258,434,416],{"class":271},[258,436,437,439,442,444,447,450],{"class":260,"line":323},[258,438,400],{"class":289},[258,440,441],{"class":302}," saveData",[258,443,306],{"class":289},[258,445,446],{"class":271}," navigator.connection?.saveData ",[258,448,449],{"class":289},"===",[258,451,343],{"class":302},[258,453,454],{"class":260,"line":335},[258,455,457],{"emptyLinePlaceholder":456},true,"\n",[258,459,460,463,466,469,472,475,477,479],{"class":260,"line":346},[258,461,462],{"class":289},"if",[258,464,465],{"class":271}," (wide ",[258,467,468],{"class":289},"&&",[258,470,471],{"class":289}," !",[258,473,474],{"class":271},"calm ",[258,476,468],{"class":289},[258,478,471],{"class":289},[258,480,481],{"class":271},"saveData) {\n",[258,483,484,487,489,492,494,496,499,501,504,507,509],{"class":260,"line":358},[258,485,486],{"class":275},"  addEventListener",[258,488,279],{"class":271},[258,490,491],{"class":282},"'load'",[258,493,286],{"class":271},[258,495,290],{"class":289},[258,497,498],{"class":289}," import",[258,500,279],{"class":271},[258,502,503],{"class":282},"'.\u002Fcubes.js'",[258,505,506],{"class":271},"), { once: ",[258,508,364],{"class":302},[258,510,367],{"class":271},[258,512,514],{"class":260,"line":513},8,[258,515,516],{"class":271},"}\n",[11,518,519,522,523,526,527,530],{},[255,520,521],{},"navigator.connection"," works only in Chromium-based browsers. In the others, ",[255,524,525],{},"saveData"," is simply ",[255,528,529],{},"false",".",[11,532,533],{},"You can see the effect in Total Blocking Time – the time when the page doesn't react to taps and clicks because the browser is running scripts. On all four measured pages it went down from 108–178 ms to 0 ms.",[31,535,537],{"id":536},"a-carousel-instead-of-a-long-list","A carousel instead of a long list",[11,539,540],{},"On phones and tablets I turned a few grids with many elements into carousels. The kind where you can see right away that something goes past the edge of the screen and you can swipe or scroll it. Thanks to that, the page gets much shorter and the footer with the contact details is closer.",[11,542,543],{},"On the old site, the carousels were made with Splide, started by Alpine.js. Now a carousel is a block style: a normal group of blocks in WordPress gets a class, and every element inside it is a slide. You arrange the slides in the editor like any other content.",[11,545,546,547,550,551,554],{},"The browser does the scrolling itself – ",[255,548,549],{},"overflow-x"," and ",[255,552,553],{},"scroll-snap"," are enough:",[248,556,560],{"className":557,"code":558,"language":559,"meta":253,"style":253},"language-css shiki shiki-themes github-light github-dark",".carousel {\n  display: flex;\n  gap: 1.5rem;\n  overflow-x: auto;\n  overscroll-behavior-x: contain;\n  scroll-snap-type: x mandatory;\n}\n\n.carousel > * {\n  flex: 0 0 85%; \u002F* a part of the next slide shows at the edge *\u002F\n  scroll-snap-align: start;\n}\n","css",[255,561,562,569,583,598,610,622,637,641,645,659,685,698],{"__ignoreMap":253},[258,563,564,567],{"class":260,"line":261},[258,565,566],{"class":275},".carousel",[258,568,293],{"class":271},[258,570,571,574,577,580],{"class":260,"line":268},[258,572,573],{"class":302},"  display",[258,575,576],{"class":271},": ",[258,578,579],{"class":302},"flex",[258,581,582],{"class":271},";\n",[258,584,585,588,590,593,596],{"class":260,"line":296},[258,586,587],{"class":302},"  gap",[258,589,576],{"class":271},[258,591,592],{"class":302},"1.5",[258,594,595],{"class":289},"rem",[258,597,582],{"class":271},[258,599,600,603,605,608],{"class":260,"line":323},[258,601,602],{"class":302},"  overflow-x",[258,604,576],{"class":271},[258,606,607],{"class":302},"auto",[258,609,582],{"class":271},[258,611,612,615,617,620],{"class":260,"line":335},[258,613,614],{"class":302},"  overscroll-behavior-x",[258,616,576],{"class":271},[258,618,619],{"class":302},"contain",[258,621,582],{"class":271},[258,623,624,627,629,632,635],{"class":260,"line":346},[258,625,626],{"class":302},"  scroll-snap-type",[258,628,576],{"class":271},[258,630,631],{"class":302},"x",[258,633,634],{"class":302}," mandatory",[258,636,582],{"class":271},[258,638,639],{"class":260,"line":358},[258,640,516],{"class":271},[258,642,643],{"class":260,"line":513},[258,644,457],{"emptyLinePlaceholder":456},[258,646,648,650,653,657],{"class":260,"line":647},9,[258,649,566],{"class":275},[258,651,652],{"class":289}," >",[258,654,656],{"class":655},"s9eBZ"," *",[258,658,293],{"class":271},[258,660,662,665,667,670,673,676,679,682],{"class":260,"line":661},10,[258,663,664],{"class":302},"  flex",[258,666,576],{"class":271},[258,668,669],{"class":302},"0",[258,671,672],{"class":302}," 0",[258,674,675],{"class":302}," 85",[258,677,678],{"class":289},"%",[258,680,681],{"class":271},"; ",[258,683,684],{"class":264},"\u002F* a part of the next slide shows at the edge *\u002F\n",[258,686,688,691,693,696],{"class":260,"line":687},11,[258,689,690],{"class":302},"  scroll-snap-align",[258,692,576],{"class":271},[258,694,695],{"class":302},"start",[258,697,582],{"class":271},[258,699,701],{"class":260,"line":700},12,[258,702,516],{"class":271},[119,704,705,711,717],{},[122,706,707,710],{},[255,708,709],{},"scroll-snap-type: x mandatory"," – when you lift your finger, scrolling always stops at the start of a slide,",[122,712,713,716],{},[255,714,715],{},"overscroll-behavior-x: contain"," – scrolling to the end of the carousel doesn't scroll the page further and doesn't start the browser's \"back\" gesture,",[122,718,719,722],{},[255,720,721],{},"flex: 0 0 85%"," – a slide doesn't take the full width, so you can see there's another one next to it.",[11,724,725,727],{},[255,726,553],{}," works in all major browsers today, so every element snaps into the right place. I only decide how big an element should be, where it goes and what kind of component it is. That's why there's much less code than with a library.",[11,729,730],{},"The script (3.5 kB, 2.6 kB together with the CSS after compression) only adds what CSS can't do: dots, a loop, autoplay and dragging with a mouse. On a phone you scroll with your finger, natively – no library catches your gestures. A few rows, for example the reviews on the home page, scroll sideways only on a phone and have no script at all – CSS alone is enough.",[11,732,733],{},"For accessibility, four things were important:",[119,735,736,747,757,767],{},[122,737,738,739,742,743,746],{},"the dots are buttons (",[255,740,741],{},"\u003Cbutton>",") with a label like \"Show slide 2 of 5\" and ",[255,744,745],{},"aria-current"," on the active one,",[122,748,749,750,550,753,756],{},"the carousel has ",[255,751,752],{},"role=\"region\"",[255,754,755],{},"aria-roledescription",", and the slides have a label like \"slide 1 of 5\",",[122,758,759,760,550,763,766],{},"the slide copies needed for the loop have ",[255,761,762],{},"aria-hidden=\"true\"",[255,764,765],{},"tabindex=\"-1\"",", so neither a screen reader nor the Tab key gets to them,",[122,768,769],{},"autoplay stops on hover, on focus, after a tap and in an inactive tab, and it's turned off when reduced motion is on in the system.",[11,771,772,773,777],{},"On superauto.pl I once suggested Swiper, because one carousel had to work in several places and load images in advance – I described it in the post ",[14,774,776],{"href":775},"\u002Fblog\u002F2026\u002Fone-carousel-instead-of-three","One carousel instead of three",". Here the carousels are simpler, so the browser was enough.",[31,779,781],{"id":780},"less-css-and-fewer-requests","Less CSS and fewer requests",[119,783,784,790,796,802,811,821],{},[122,785,786,789],{},[125,787,788],{},"CSS:"," 14–16 kB per page instead of 58–64 kB. In a block theme, WordPress loads styles only for the blocks that are on the page, and the theme's own stylesheets (carousel, forms, consent window) are added only where they're needed.",[122,791,792,795],{},[125,793,794],{},"Requests:"," 33–69 instead of 120–140.",[122,797,798,801],{},[125,799,800],{},"Icons"," aren't separate files – the server puts the used SVG icons straight into the HTML.",[122,803,804,807,808,530],{},[125,805,806],{},"The font"," Inter is on the site's own server: 3 WOFF2 files, and the two most important ones have ",[255,809,810],{},"preload",[122,812,813,816,817,820],{},[125,814,815],{},"Images:"," thumbnails in AVIF and correct ",[255,818,819],{},"sizes"," on cards. The old site already had AVIF and WebP, so the difference here is small.",[122,822,823,826],{},[125,824,825],{},"A small thing:"," the WordPress emoji script is turned off.",[31,828,830],{"id":829},"what-didnt-help-at-all-cleaning-up-icons","What didn't help at all: cleaning up icons",[11,832,833],{},"I removed 40 SVG files from the theme's icon library. 9 unused icons were replaced by animations, and 31 duplicates were merged into 2 files. The theme is 262 kB lighter, and the old icon names still work thanks to aliases, so the page content didn't need any fixes.",[11,835,836],{},"But it had no effect on the speed of the site – 0 kB of difference. The server only ever put the used icons into the HTML, so the unused files never reached the browser. The gain is somewhere else: there are fewer similar icons to choose from in the editor.",[11,838,839],{},"It's similar with the number of elements on the page (DOM). On the home page it went down from 1408 to 832 (−41%), and on the References page by 13%. About us has the same number of elements, and the \"Websites\" offer page has 18% more, because it has more sections. There are fewer elements where the page really became simpler.",[31,841,843],{"id":842},"results","Results",[11,845,846],{},"Medians from 3 Lighthouse runs on mobile (default settings – a simulated slow network and a slow processor):",[45,848,849,867],{},[48,850,851],{},[51,852,853,855,858,861,864],{},[54,854,56],{},[54,856,857],{},"Performance",[54,859,860],{},"LCP",[54,862,863],{},"TBT",[54,865,866],{},"Page size",[64,868,869,885,901,917],{},[51,870,871,873,876,879,882],{},[69,872,71],{},[69,874,875],{},"70 → 99",[69,877,878],{},"4.37 → 2.00 s",[69,880,881],{},"178 → 0 ms",[69,883,884],{},"2.6 MB → 362 kB",[51,886,887,889,892,895,898],{},[69,888,82],{},[69,890,891],{},"80 → 95",[69,893,894],{},"3.89 → 2.89 s",[69,896,897],{},"131 → 0 ms",[69,899,900],{},"2.5 MB → 335 kB",[51,902,903,905,908,911,914],{},[69,904,93],{},[69,906,907],{},"74 → 100",[69,909,910],{},"4.36 → 1.10 s",[69,912,913],{},"108 → 0 ms",[69,915,916],{},"2.7 MB → 514 kB",[51,918,919,921,924,927,930],{},[69,920,104],{},[69,922,923],{},"76 → 99",[69,925,926],{},"4.02 → 2.07 s",[69,928,929],{},"173 → 0 ms",[69,931,932],{},"2.5 MB → 279 kB",[11,934,935,936,939],{},"On desktop (",[255,937,938],{},"--preset=desktop","), performance went up from 96–98 to 100. On all four pages, on mobile and on desktop, accessibility went up from 94–95 to 100 and best practices from 77 to 100. SEO was and still is at 100.",[31,941,943],{"id":942},"the-measurements-and-what-you-cant-compare-11","The measurements and what you can't compare 1:1",[119,945,946,952,958,964,970,976],{},[122,947,948,951],{},[125,949,950],{},"Who and how:"," Claude Code did the measurements too – Lighthouse 13, 3 runs per page, the table shows the median.",[122,953,954,957],{},[125,955,956],{},"\"After\""," is the site in production.",[122,959,960,963],{},[125,961,962],{},"\"Before\""," is copies of the old site from the Internet Archive (Wayback Machine), because the old version can't be run anymore. The archive has a different server, adds its own scripts (about 160 kB) and is missing some images. That's why I treat the \"before\" times and scores as approximate. The sizes in the table don't include the archive's scripts – they're more reliable than the times.",[122,965,966,969],{},[125,967,968],{},"Analytics:"," the measurements in the tables were taken before analytics was added – the old site loaded about 570 kB of analytics and marketing tools. Without them, the old site still loaded about 1.5 MB of JavaScript – about 40 times more than the new one. Now the new site has Google Tag Manager and Google Analytics too. I checked the home page again in Lighthouse in Chrome (mobile mode, incognito window): with the consents accepted, performance is 99, and without them – 100. In a single run, PageSpeed Insights showed 88 – mainly because of the Google Tag Manager scripts.",[122,971,972,975],{},[125,973,974],{},"Page heights"," come from the full-page screenshots in the Lighthouse reports (phone, 412 × 823 px). The archived copies are missing some images, so the old pages may have been even longer in reality.",[122,977,978,981],{},[125,979,980],{},"Lighthouse"," simulates a slow phone, so the numbers are different from PageSpeed Insights and from data from real devices.",[31,983,985],{"id":984},"was-it-worth-it","Was it worth it",[11,987,988],{},"A website takes very long hours of work – not 15 minutes with AI and done, as you often hear. It was almost a whole month of work after hours, taking care of every detail. In my opinion it paid off: the site is fast and looks good.",[31,990,992],{"id":991},"what-i-took-from-it","What I took from it",[119,994,995,998,1001,1004,1010,1013],{},[122,996,997],{},"Removing JavaScript that the page doesn't need on load helped the most: from about 2 MB to 35–39 kB, and Total Blocking Time went down to 0 ms.",[122,999,1000],{},"Load heavy things – reCAPTCHA, a 3D scene, the YouTube player – only when they're needed.",[122,1002,1003],{},"A long page on a phone means a longer way to the contact details. A grid with many elements often works better as a carousel where you can see part of the next slide.",[122,1005,1006,1007,1009],{},"A simple carousel doesn't need a library: the browser scrolls (",[255,1008,553],{},"), and the script only adds dots and autoplay.",[122,1011,1012],{},"Cleaning up files in the theme doesn't make the site faster if only the used ones reach the browser anyway.",[122,1014,1015],{},"Treat a comparison with an archived copy as approximate – sizes and the number of requests are more reliable than times.",[1017,1018,1019],"style",{},"html pre.shiki code .sqY6-, html code.shiki .sqY6-{--shiki-default:#6A737D;--shiki-dark:#90A1B9}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":253,"searchDepth":268,"depth":268,"links":1021},[1022,1023,1024,1025,1026,1027,1028,1029,1030,1031,1032],{"id":33,"depth":268,"text":34},{"id":113,"depth":268,"text":114},{"id":146,"depth":268,"text":147},{"id":210,"depth":268,"text":211},{"id":536,"depth":268,"text":537},{"id":780,"depth":268,"text":781},{"id":829,"depth":268,"text":830},{"id":842,"depth":268,"text":843},{"id":942,"depth":268,"text":943},{"id":984,"depth":268,"text":985},{"id":991,"depth":268,"text":992},"2026-11-24","Together with Claude Code, I rewrote the website of the company I work for, moving it from Laravel to WordPress. Its Lighthouse performance score on mobile went from 70–80 to 95–100. Less JavaScript helped the most – cleaning up icons didn't help at all.",false,"md",null,"case-study",{},"\u002Fog\u002Fblog\u002Fnowa-pesi-pl-en.jpg","\u002Fblog\u002F2026\u002Fthe-new-pesi-pl","\u002Fprojects\u002F2026\u002Fpesi-pl",{"title":5,"description":1034},"blog\u002F2026\u002Fthe-new-pesi-pl",[1046,1047,559],"performance","wordpress","nowa-pesi-pl","LqV3GmHAK2x9yKSWD1aZZcxH_jDKcSGuv7mtf7aqLs8",{"id":1051,"title":1052,"agency":1053,"body":1054,"compare":1064,"cover":1104,"date":1106,"description":1107,"draft":1035,"extension":1036,"facts":1108,"featured":1035,"gallery":1037,"galleryLead":1037,"highlights":1120,"image":1133,"links":1134,"meta":1135,"navigation":456,"note":1136,"ogImage":1137,"path":1042,"seo":1138,"stack":1139,"stem":1146,"tags":1147,"__hash__":1148},"projects_en\u002Fprojects\u002F2026\u002Fpesi-pl\u002Findex.md","pesi.pl – a new version of the website","Pesi",{"type":8,"value":1055,"toc":1062},[1056,1059],[11,1057,1058],{},"pesi.pl is the website of the company I work for. The old version ran on Laravel, and every change – including every blog post – was pasted in by a developer, not by marketing. I rewrote it in WordPress with a block theme, so that marketing can publish on their own and follow changes on the site more easily. Claude Code wrote the code. I thought the whole thing through so that I wouldn't repeat the mistakes from the Laravel version, decided on the layout and components and checked every view. I also moved the case studies and all the blog posts so that they kept their previous look.",[11,1060,1061],{},"What mattered most to me was that the site is light and doesn't go on forever on a phone – the footer has the contact details, so the way there should be short.",{"title":253,"searchDepth":268,"depth":268,"links":1063},[],{"before":1065,"after":1071,"rows":1075,"note":1103},{"src":1066,"width":1067,"height":1068,"label":1069,"alt":1070},"\u002Fprojects\u002F2026\u002Fpesi-pl\u002Fold-home-top.webp",1440,900,"Before · the Laravel site","The old pesi.pl website – first screen",{"src":1072,"width":1067,"height":1068,"label":1073,"alt":1074},"\u002Fprojects\u002F2026\u002Fpesi-pl\u002Fhome-top.webp","After · the WordPress site","The new pesi.pl website – first screen",[1076,1080,1084,1088,1091,1095,1099],{"label":1077,"before":1078,"after":1079},"Lighthouse performance","70","99",{"label":1081,"before":1082,"after":1083},"JavaScript","2,055 kB","37 kB",{"label":1085,"before":1086,"after":1087},"CSS","58 kB","16 kB",{"label":866,"before":1089,"after":1090},"2.6 MB","362 kB",{"label":1092,"before":1093,"after":1094},"Requests","131","47",{"label":1096,"before":1097,"after":1098},"Total Blocking Time","178 ms","0 ms",{"label":1100,"before":1101,"after":1102},"Page height (px)","14,553","10,058","Home page on mobile, medians from 3 Lighthouse runs. Before – a copy of the old site from the Internet Archive (17 July 2026), sizes without the archive's scripts, times and scores approximate. Measured before analytics was added – with Google Tag Manager, the home page scores 99 (with consents) and 100 (without) in Lighthouse in Chrome.",{"desktop":1072,"phone":1105,"width":1067,"height":1068,"alt":1074},"\u002Fprojects\u002F2026\u002Fpesi-pl\u002Fhome-phone-top.webp","2026-11-10","The website of the company I work for: from Laravel to WordPress with the block editor, so that marketing can publish posts on their own. Lighter, shorter on a phone and with animated 3D cubes.",[1109,1111,1114,1117],{"value":875,"text":1110},"home page performance in Lighthouse on mobile",{"value":1112,"text":1113},"2 MB → 37 kB","of JavaScript on the home page on mobile",{"value":1115,"text":1116},"18 → 12","phone screens to scroll through on the home page",{"value":1118,"text":1119},"100","accessibility, best practices and SEO in Lighthouse on all measured pages",[1121,1124,1127,1130],{"title":1122,"text":1123},"Marketing publishes on their own","Before, every change and every post was pasted in by someone from the front-end or back-end team. Now posts are made in the block editor, and an article can show who its author is.",{"title":1125,"text":1126},"Carousels instead of long lists","On phones and tablets, grids with many elements are carousels built with CSS scroll-snap. You can see part of the next slide, and the page is shorter – the footer with the contact details is closer.",{"title":1128,"text":1129},"3D cubes that don't slow the page down","A normal image loads first, and the Three.js scene only after the page has loaded – only on wider screens and not when reduced motion is on.",{"title":1131,"text":1132},"Scripts only when they're needed","reCAPTCHA loads the first time someone uses the form, the YouTube player after a click on the thumbnail, and the menu animations on hover.","\u002Fprojects\u002F2026\u002Fpesi-pl\u002Fthumbnail.webp",{"live":16},{},"Claude Code wrote the code – I planned the whole thing, decided on the layout and components and checked every view. The \"before\" results were measured on a copy of the old site from the Internet Archive.","\u002Fog\u002Fprojects\u002Fpesi-pl-en.jpg",{"title":1052,"description":1107},[1140,1141,1142,1143,1144,1145],"WordPress","block theme","PHP","Three.js","CSS scroll-snap","no jQuery","projects\u002F2026\u002Fpesi-pl\u002Findex",[1047],"1OYREGBSoBvseV0IbYb4BGGExmdVxDJJxlTabhMs09E",{"left":1150,"top":1150,"width":1151,"height":1151,"rotate":1150,"vFlip":1035,"hFlip":1035,"body":1152},0,24,"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"\u002F>\u003Cpath d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"\u002F>\u003C\u002Fg>",1795524940763]