User Admin Simplifier
Hospedagem WordPress com plugin User Admin Simplifier
Onde posso hospedar o plugin User Admin Simplifier?
Este plugin pode ser hospedado em qualquer provedor que tenha WordPress instalado. Recomendamos utilizar uma hospedagem seguro, com servidores especializados para WordPress, como o serviço de hospedagem de sites da MCO2.
Hospedando o plugin User Admin Simplifier em uma empresa de hospedagem de confiança
A MCO2, além de configurar e instalar o WordPress na versão mais atual para seus clientes, oferece o plugin WP SafePress, um sistema singular que assegura e otimiza seu site ao mesmo tempo.
Por que a Hospedagem WordPress funciona melhor na MCO2?
A Hospedagem WordPress funciona melhor pois a MCO2 possui servidores otimizados para WordPress. A instalação de WordPress é diferente de uma instalação trivial, pois habilita imediatamente recursos como otimização de imagens, proteção da página de login, bloqueio de atividades maliciosas diretamente no firewall, cache avançado e HTTPS ativado por padrão. São recursos que potencializam seu WordPress para a máxima segurança e o máximo desempenho.
Lets any Administrator simplify the WordPress Admin interface, on a per-user basis. Hide any specific menu or submenu (including in the admin bar) or hide the admin bar entirely.
Development
Requirements
- PHP 7.4 or higher
- Composer (for managing PHP dependencies)
- Node.js and npm (for building JavaScript assets)
Setup
- Clone the repository
- Run
composer installto install PHP dependencies - Run
npm installto install JavaScript dependencies - Run
npm run buildto build the React application
Code Quality
This plugin uses PHPStan for static analysis to ensure code quality and type safety.
To run PHPStan:
composer install (first time only)
npm run phpstan
Or directly with PHP:
php vendor/bin/phpstan analyse
The project is configured to run PHPStan at level 3 for improved reliability and maintainability.
Testing
The plugin includes PHP unit tests, end-to-end (E2E) tests, and visual regression tests.
PHP Unit Tests
Run PHP unit tests:
npm run test:php
End-to-End Tests
E2E tests use Playwright to test the plugin in a real WordPress environment.
Setup:
- Install dependencies:
npm install - Start WordPress environment:
npm run env:start - Run tests:
npm run test:e2e
See tests/e2e/README.md for detailed documentation on running and writing E2E tests.
Available E2E test commands:
npm run env:start– Start WordPress test environmentnpm run env:stop– Stop WordPress test environmentnpm run test:e2e– Run E2E tests in headless modenpm run test:e2e:headed– Run E2E tests with visible browsernpm run test:e2e:ui– Run E2E tests in interactive UI modenpm run test:e2e:debug– Run E2E tests in debug modenpm run test:e2e:report– View test report
Visual Regression Testing
This plugin uses Playwright for automated visual regression testing to catch unintended visual changes during development.
Prerequisites:
- Node.js 18 or higher
- Playwright browsers installed (Chromium by default)
Initial Setup:
- Install dependencies:
npm install - Install Playwright browsers:
npx playwright install --with-deps chromium - Build the application:
npm run build
Running Visual Tests:
- Run all visual tests:
npm run test:visual - Run tests in UI mode (interactive):
npm run test:visual:ui - Update baseline snapshots:
npm run test:visual:update
How It Works:
Visual regression tests capture screenshots of the UI and compare them to baseline images. If there are visual differences, the tests will fail and generate a report showing what changed. This helps detect:
- Unintended layout changes
- CSS styling issues
- Component rendering problems
- Responsive design regressions
Test Coverage:
The visual tests cover:
– Initial app state (no user selected)
– User selector dropdown
– Full menu interface with user selected
– Menu list with toggle functionality
– Admin bar options
– Save and reset buttons
– Checked menu states
– Expandable submenus
– Responsive layouts (tablet and mobile views)
Updating Snapshots:
When intentional UI changes are made, update the baseline snapshots:
npm run test:visual:update
Review the changes in the tests/visual/app.spec.js-snapshots/ directory to ensure they match your intended changes.
CI Integration:
Visual regression tests run automatically on GitHub Actions for all pull requests and pushes to main/master branches. Test reports and snapshots are uploaded as artifacts for review.
Running All Tests
Run all tests (PHP unit tests + E2E tests):
npm run test
Capturas de tela

Choose a user to edit their menus

Check the menu section to disable. Click 'Save Changes' to apply your settings. Click 'Clear User Settings' to reset the disabled menus for the selected user.
