---
title: "Modules — Egenverk Lagom"
description: "What each Lagom module does, which settings it has, what the defaults are and what happens when you switch it on or off."
canonical: https://egenverk.se/en/plugins/lagom/docs/modules
lang: en
updated: 2026-10-14
alternate: https://egenverk.se/plugins/lagom/docs/moduler.md
---
# Modules

Egenverk Lagom · v0.33.2 · WordPress 6.5+, PHP 7.4+ · Updated 2026-10-14

Every module ships off and is switched on by itself. This page follows Lagom's tabs. CSS and JS per page has a page of its own: [CSS and JS](css-and-js).

## Performance

### Dashboard widgets

With the module on, the widgets you chose are not built at all, for any user. Their code does not run. Hiding a widget in Screen Options only hides it; its code still runs.

**Widgets seen on the dashboard** lists every widget Lagom has seen, with a switch per widget. The list fills when an administrator opens the dashboard, so open it once after activation. A widget Lagom has removed stays in the list and can be switched back on. Work a plugin does while registering its widget is not affected, nor are scripts it loads for the dashboard. You stop such files with the rules under [CSS and JS](css-and-js).

The **Banners** row appears only when a plugin with a known banner is installed. Today that is a payment service's "Go live" banner, shown on the dashboard while the service is in test mode. It is off by default.

### Request watch

The request watch counts calls per endpoint and minute and warns when one runs away:

- `wc-ajax`, per endpoint
- `admin-ajax.php`, per action, with Heartbeat on a row of its own
- REST, per route pattern, so `/wp/v2/pages/3` and `/wp/v2/pages/4` are one row. Unknown routes count as `no-route`, and calls refused before they run count by their path with numbers as `{id}`.
- `wp-cron.php`

Each call adds a short line to a file for that minute under `uploads/egenverk-lagom/watch/`. Nothing is written to the database during the call. A file stops growing at 2 MB. A WP-Cron job sums finished minutes every minute and deletes the files. Files older than a day are deleted unread.

| Setting | Default | What it does |
| --- | --- | --- |
| **Warn above** | 120 calls / min (10–10,000) | When an endpoint passes the limit in one minute, administrators get a notice on every admin screen until someone clicks **Dismiss**, and an email is sent, at most one per endpoint per hour. |
| **Email alerts to** | Empty | The address the emails go to. Empty means the site's admin email. |

With the module on, the card shows the 25 endpoints with the most calls in one minute during the last hour: type, endpoint, total, peak per minute and last minute. It says when the last sum ran and warns when WP-Cron has not run for ten minutes, when the folder cannot be written to or when a minute reached the 2 MB cap.

When you switch the module off it stops counting, clears the list of alerts and deletes the files, once at once and once ten minutes later.

### Heartbeat, transients and sessions

With the module on:

- **Heartbeat in the admin:** choose **every 15 s**, **every 30 s**, **every 60 s** or **every 120 s**. The default is every 60 seconds.
- Each night at 03:00 in the site's time zone, kept across daylight-saving changes, Lagom asks WordPress to delete expired transients and itself removes expired WooCommerce sessions, 500 at a time for at most 20 seconds.

WordPress leaves expired transients in the database when a persistent object cache is active. Lagom asks WordPress to remove them from the database anyway.

The module can only be switched on after **Show what would be removed** has counted within the last ten minutes. The count shows how many expired transients and shop sessions tonight's run would remove, and whether a persistent object cache is in use. Changing the heartbeat interval needs no new count.

With the module on, the card shows **Next run** and the last ten runs. The log keeps the last 60.

## Order search

### Fast order search

With the module on, Lagom reads the search term on the order list before anything is searched and looks each reading up in an indexed column, instead of WooCommerce searching every order field. WooCommerce's own search does not run.

How the term is read:

- contains `@`: email. If it ends with `*`, the start of the address is searched.
- starts like a UUID: transaction id
- `#` followed by digits: order number
- starts with `+46` or `0046`, or with `0` followed by 7–10 digits, with or without spaces and hyphens: phone, read as `+46…`
- three digits, a space, two digits: postcode
- five digits: order number or postcode
- nine digits not starting with zero: order number or phone
- other digits, up to 13: order number
- text: name. One word matches the start of the first name, last name or company. Two words match the start of the first and last name.

A notice on the order list says how the term was read, for example "Fast search read this as …", and links to **Search all fields (slow)**, which runs WooCommerce's normal search. If part of the term has no fast lookup on the site, the notice says those orders are not shown. Order search shows at most 500 results, newest first.

The card says where answers come from on your site:

1. **Another plugin** answering through the `egenverk_lagom_order_search` filter, see [Reference](reference).
2. **The HPOS tables** when HPOS is on: order number, email, transaction id and phone. Name and postcode only where the site has an index on those columns. The card says which indexes are missing, and those searches find nothing until an index exists.
3. **Lagom's own index** when orders are stored as posts. Without it only order numbers are found fast.

### Lagom's own search index

The index switches appear on the card when the Advanced tab is on for you, see [Getting started](getting-started).

- **Build Lagom's own search index** (off by default) builds the table `{prefix}egvl_order_index`, one row per order: the billing email, phone, postcode, first name, last name and company in normalised form, plus the transaction id. Every column is indexed.
- **Build only at night (00–06)** (off by default) fills the index only between 00 and 06 in the site's time zone.

The index fills through Action Scheduler in batches of 500 orders with a 20-second pause. Switching the box off, or the whole module, pauses the fill and keeps what is built. If a batch dies, the next admin page load restarts the fill. The card shows how many orders are indexed, and order search uses the index only once it is complete.

Once the table exists it is kept in step with the orders even while the fill is paused: rows are added and updated when orders are created or saved, and removed when an order is deleted or anonymised. The index holds personal data; see [Data and privacy](data-and-privacy).

## Appearance

### Skin

The skin gives wp-admin the Egenverk colours: the admin menu, the admin bar and the background share one colour, a screen's content sits on one sheet, and fields and buttons get softer. The module is off by default. A preview beside the settings shows the whole admin with your choices.

| Setting | Choices | Default |
| --- | --- | --- |
| **Mode** | **Light**, **Dark**, **Auto** | Light. Only for you. Auto follows your computer. |
| **Side menu** | **Like the background**, **Contrast** | Like the background. Contrast gives a dark menu that stands out. |
| **Background** | **Stone**, **Sand**, **Slate** | Stone. The colour around the content in the light mode. |
| **Font** | Manrope, Inter, Figtree, **System font** | Manrope |
| **Corner radius** | 4, 6 or 8 px | 6 px |
| **Gradient on primary buttons and switches** | On or off | On |
| **Entrance animation** | On or off | On. Cards slide up and fade in when a page opens. Always off when the system asks for reduced motion. |
| **Lagom wins over other plugins’ styles** | On or off | Off. Plugins that restyle core elements then keep their look. |
| **Screens without the skin** | Screen ids, one per line | Empty |

The fonts ship with the plugin and load only in the admin, only the chosen one.

On their profile, each user has **Use Lagom skin** to turn the skin off for themselves, and **Colour scheme** with **Light**, **Dark** and **Auto (follows the system)**. It is the same choice as **Mode** on the tab.

With the skin on:

- the login page gets the same look. Logged-out visitors follow the browser's light or dark mode.
- the admin bar shows an environment badge when the site is not marked as production.
- checkboxes in settings forms become switches, but not on WooCommerce's order screens or in the checkout settings.

The block editor is always left alone. Add `?egenverk_lagom_skin=0` to the address to see a page without the skin.

## Advanced

The modules here appear only when the Advanced tab is on for you, see [Getting started](getting-started).

### Scheduler tables

The module lets Action Scheduler's own cleaner delete finished and failed jobs, and their logs, sooner than it does on its own. Lagom only sets the cleaner's filters. Pending jobs are not touched.

| Setting | Default | What it does |
| --- | --- | --- |
| **Keep finished jobs for** | 14 days (1–365) | Finished and canceled jobs older than this are removed. Action Scheduler's own default is 30 days. |
| **Keep failed jobs for** | 90 days (30–365) | Failed jobs older than this are removed. They are never kept less than 30 days, since they are often the only record of why a payment or webhook call failed. |
| **Finished jobs per cleanup run** | 100 (20–200) | How many finished and canceled jobs per status are removed each time the queue runs. |

Canceled jobs that never ran are removed by Action Scheduler at the next cleanup, whatever the number of days. Action Scheduler 4.0 and later remove failed jobs themselves. Older versions never do, and there Lagom adds one daily job that asks Action Scheduler's cleaner to do it.

The module can only be switched on once **Show what would be removed** has counted with exactly the values in the form within the last ten minutes. The same goes for lowering a retention while the module is on. The count shows how many finished, canceled and failed jobs and log rows would go, which jobs most failed ones come from, which Action Scheduler version runs, and any log rows that belong to no job. Those are left alone.

The log keeps removals per day and source, at most 200 rows. The card shows the last 20 and the total for the last 30 days.

### Database

| Setting | Default | What it does |
| --- | --- | --- |
| **Warn when autoload exceeds** | 800 KB (100–10,000) | The **Autoloaded options** figure on the overview is marked above the limit. |

With the module on, **Tables and autoloaded options** shows the 25 largest tables with this site's prefix, plus any smaller table that can be optimized, and the 20 largest autoloaded options with a guess at which plugin owns them. Nothing is deleted.

You **Optimize** one table at a time, after ticking **I understand the table is rebuilt and may be locked briefly**. The button is there only when

- the table is not one the shop writes to on every visit or order: WordPress's own tables, WooCommerce's and Action Scheduler's
- the table is InnoDB with a file of its own (`innodb_file_per_table`)
- the table is at most 500 MB
- it has at least 20 MB and at least 20 % free space inside
- the database is on the same server and its data directory has at least twice the table's size free
- the table does not belong to another site in a network

Otherwise the reason is shown where the button would have been. Only one rebuild runs at a time.

**Stop autoloading** stops autoloading for one option. The value is not changed or deleted. Protected options, such as WordPress's core settings, widgets, themes and transients, are marked **Protected**. Every change lands under **Recent database changes** and can be reversed with **Undo**, which puts back exactly the autoload value the option had.

The log keeps the last 100 changes, and the card shows the last ten. Autoload changes stay if Lagom is uninstalled; see [Data and privacy](data-and-privacy).

## Resources

- [Product page](https://egenverk.se/en/plugins/lagom)
- [Changelog](https://egenverk.se/en/plugins/lagom/changelog)
- [Docs](https://egenverk.se/en/plugins/lagom/docs)
- Previous: [Getting started](https://egenverk.se/en/plugins/lagom/docs/getting-started)
- Next: [CSS and JS](https://egenverk.se/en/plugins/lagom/docs/css-and-js)
