# baldwin/magento2-module-url-data-integrity-checker

> Magento 2 module which can find potential url related problems in your catalog data

`composer require baldwin/magento2-module-url-data-integrity-checker`

Canonical URL: https://packagento.com/baldwin/magento2-module-url-data-integrity-checker

## At a glance

- **Vendor**: baldwin (https://packagento.com/baldwin.md)
- **Latest version**: 1.6.1 — released 2026-04-14
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/baldwin/magento2-module-url-data-integrity-checker and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require baldwin/magento2-module-url-data-integrity-checker:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Magento 2 module which can find potential url related problems in your catalog data

## README

### Purpose

The purpose of this module is to give store owners of a Magento 2 shop insight into what url-related problems they have in their products, categories and url rewrites.  
It was explicitly chosen not to have automated fixers for these problems, since fixing these issues can have a significant SEO impact.  
It should be up to the store owner to figure out how he/she wants to fix these problems. Doing this with an automated tool might have a negative impact on SEO rankings, hence why it only reports problems and doesn't try to fix them.

### Implemented features

- It can detect categories having incorrect `url_path` attribute values
- It can detect categories having duplicated `url_key` attribute values within the same parent
- It can detect categories having an empty `url_key` attribute value
- It can detect products having non-empty `url_path` attribute values
- It can detect products having duplicated `url_key` attribute values on the same store view
- It can detect products having an empty `url_key` attribute value

### Roadmap

- Detecting incorrectly generated url rewrites
- Making cronjob execution times configurable
- Increasing performance of checkers, these are currently written for accuracy and not for speed
- Add a legend above the admin grids with a mapping of store view id's with their names
- Improve tests
- ...

### Compatibility

This module should be compatible with Magento 2.1.x, 2.2.x, 2.3.x and 2.4.x versions.  
Some code in this module is using old ways of doing things. It could have been written in a more modern way (using message queues instead of cronjobs, use newer syntax for UI components, ...). But we wanted this module to be compatible with older versions of Magento, so we've chosen this route for now.

The module should be compatible with PHP 7.1, 7.2, 7.3, 7.4, 8.1, 8.2, 8.3 and 8.4

### Installation

You can use composer to install this module:

```sh
composer require baldwin/magento2-module-url-data-integrity-checker
```

Or download the code and put all the files in the directory `app/code/Baldwin/UrlDataIntegrityChecker`

After which you can then activate it in Magento using:

```sh
bin/magento setup:upgrade
```

### Usage

There are some automatic cronjobs running every night at 02:10, 02:15, 02:20 and 02:30 which will run the various checkers of this module.  
You can also opt to manually refresh one of the checkers in the Magento admin, which will schedule one of the cronjobs to be ran the next minute. You'll have to wait a few minutes (depending on the number of problems and how big your catalog is) before you'll see the results appearing. You'll need to refresh the page yourself btw, it won't happen by itself.

There are also some cli commands you can execute, which will give you instant feedback about found problems, and will also store that data so you can see them in the Magento admin:

- `bin/magento catalog:category:integrity:urlkey`
- `bin/magento catalog:category:integrity:urlpath`
- `bin/magento catalog:product:integrity:urlkey`
- `bin/magento catalog:product:integrity:urlpath`

In the Magento admin, you can find the results in:

- for Magento 2.1.x: Products > Data Integrity Checker
- for Magento 2.2.0 and higher: Catalog > Data Integrity Checker

The results of the checkers are currently stored by default in the directory `var/tmp` as `.json` files.  
But you can change the path in the backend settings under Stores > Configuration > Catalog > Url Data Integrity Checker by entering a relative path starting from the Magento installation directory or an absolute path. The directory you enter there needs to exist before it will work.

You can configure this module to ignore problems with invisible products (via Stores > Configuration > Catalog > Url Data Integrity Checker). Because in recent versions of Magento, url rewrites for invisible products are not being generated, so if there are problems with the `url_path` or `url_key` attributes of such products, they should not cause issues with url rewrites. An additional benefit of this option is that it will use less time and less memory to run the product checkers. This option is disabled by default, so you'll need to enable it.

### Some screenshots

#### Example of backend report for product url key problems
![Backend example for product url keys](docs/images/backend-product-url-keys.png)

#### Example of cli report for category url path problems
![CLI example for category url paths](docs/images/cli-category-url-paths.png)

### Contributing

After cloning your fork:

1. Create an `auth.json` file with your credentials for https://repo.magento.com/
1. Run `composer install`
1. Make sure running `make check` doesn't report problems with proposed changes

## Recent Versions

| Version | Released |
|---|---|
| 1.6.1 | 2026-04-14 |
| 1.6.0 | 2025-04-09 |
| 1.5.3 | 2024-03-22 |
| 1.5.2 | 2023-03-16 |
| 1.5.1 | 2023-03-01 |
| 1.5.0 | 2022-07-07 |
| 1.4.0 | 2022-01-30 |
| 1.3.2 | 2021-12-20 |
| 1.3.1 | 2021-10-23 |
| 1.3.0 | 2021-09-26 |

Showing 10 of 15 versions. Full release history on https://packagento.com/baldwin/magento2-module-url-data-integrity-checker.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magento/framework | ^100.1 \|\| ^101.0 \|\| ^102.0 \|\| ^103.0 |
| magento/module-backend | ^100.1 \|\| ^101.0 \|\| ^102.0 |
| magento/module-catalog | ^101.0 \|\| ^102.0 \|\| ^103.0 \|\| ^104.0 |
| magento/module-config | ^100.1 \|\| ^101.0 |
| magento/module-cron | ^100.1 |
| magento/module-store | ^100.1 \|\| ^101.0 |
| magento/module-theme | ^100.1 \|\| ^101.0 |
| magento/module-ui | ^100.1 \|\| ^101.0 |
| php | ~7.1.0 \|\| ~7.2.0 \|\| ~7.3.0 \|\| ~7.4.0 \|\| ~8.1.0 \|\| ~8.2.0 \|\| ~8.3.0 \|\| ~8.4.0 \|\| ~8.5.0 |
| symfony/console | ^2.5 \|\| ^3.0 \|\| ^4.0 \|\| ^5.0 \|\| ^6.0 \|\| ^7.0 |

### Require (dev)

| Package | Constraint |
|---|---|
| bamarni/composer-bin-plugin | ^1.7 |
| ergebnis/composer-normalize | ^2.17 |
| mikey179/vfsstream | ^1.6 |
| phpunit/phpunit | ^12.5 |

## Quality

Latest release (1.6.1) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Fail | 140 | 14 errors, 126 warnings (ruleset: Magento2), 19 auto-fixable with phpcbf |
| PHPMD | Warning | 35 | 35 rule violations (UnusedFormalParameter:25, MissingImport:5, ExcessiveMethodLength:3, CyclomaticComplexity:1, NPathComplexity:1) |
| Cpd | Warning | 4 | 4 duplicated chunks spanning 435 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Pass | 0 |  |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 1 | 1 | – | – |
| 2.4.8 | – | 1 | 1 | – |
| 2.4.9 | – | – | 1 | 1 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["baldwin/magento2-module-url-data-integrity-checker"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

baldwin is a Magento 2 vendor on Packagento. See https://packagento.com/baldwin.md for their full catalogue.

