63% admin-user-search

Code Review | Admin User Search

WordPress plugin Admin User Search scored63%from 54 tests.

About plugin

  • Plugin page: admin-user-search
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9
  • WordPress version: 6.3.1
  • First release: May 21, 2022
  • Latest release: Feb 1, 2023
  • Number of updates: 9
  • Update frequency: every 29.3 days
  • Top authors: usersearch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /383 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲5.07MB] [CPU: ▲18.89ms] 50% from 4 tests

An overview of server-side resources used by Admin User Search
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,107.23ms on /wp-admin/users.php?page=search-users)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.07MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.97 ▲5.5163.17 ▲23.09
Dashboard /wp-admin8.99 ▲5.6969.39 ▲20.45
Posts /wp-admin/edit.php8.99 ▲5.6371.82 ▲25.44
Add New Post /wp-admin/post-new.php9.34 ▲3.45108.07 ▲6.56
Media Library /wp-admin/upload.php8.99 ▲5.7672.36 ▲34.95
Search Users /wp-admin/users.php?page=search-users9.001,107.23
Freemius Debug [v.2.5.2] /wp-admin/admin.php?page=freemius8.9959.80

Server storage [IO: ▲4.66MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 214 new files
Database: 1 new table, 11 new options
New tables
wp_admin_user_search_logs
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
fs_debug_mode
fs_active_plugins
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
fs_gdpr
fs_accounts
...

Browser metrics Passed 4 tests

Checking browser requirements for Admin User Search
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲10214.56 ▼0.181.59 ▼0.4228.26 ▼23.15
Dashboard /wp-admin2,222 ▲344.84 ▼1.17108.78 ▲4.8185.19 ▲46.92
Posts /wp-admin/edit.php2,120 ▲312.02 ▲0.0135.07 ▼5.3334.39 ▲0.11
Add New Post /wp-admin/post-new.php1,536 ▲323.20 ▲0.14676.09 ▲61.6362.85 ▲9.79
Media Library /wp-admin/upload.php1,419 ▲404.20 ▼0.0694.04 ▼4.9977.32 ▲36.28
Search Users /wp-admin/users.php?page=search-users1,0363.0145.0947.29
Freemius Debug [v.2.5.2] /wp-admin/admin.php?page=freemius1,0811.8125.8528.43

Uninstaller [IO: ▲4.66MB] [DB: ▲0.00MB] 25% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/admin-user-search/freemius/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • The plugin did not uninstall correctly, leaving 214 files (4.66MB) in the plugin directory
    • (new file) admin/assets/angular-animate.js
    • (new file) .gitignore
    • (new file) admin-user-search.php
    • (new file) README.md
    • (new file) LICENSE.txt
    • (new file) admin/assets/angular-sanitize.js
    • (new file) admin/assets/angular_datatables.css
    • (new file) admin/assets/angular_datatables.js
    • (new file) admin/assets/angular.min.js
    • (new file) README.txt
    • ...
  • Zombie WordPress options detected upon uninstall: 11 options
    • widget_recent-comments
    • admin_user_search_db_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • fs_debug_mode
    • fs_active_plugins
    • fs_gdpr
    • fs_accounts
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/admin-user-search/admin/partials/admin-user-search-admin.php
    • > /wp-content/plugins/admin-user-search/includes/class-admin-user-search-ajax.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: users

admin-user-search/admin-user-search.php 85% from 13 tests

Analyzing the main PHP file in "Admin User Search" version 1.0.2
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin37,711 lines of code in 160 files:
LanguageFilesBlank linesComment linesLines of code
PHP1268,09717,43733,406
JavaScript141,1719,3654,108
CSS192441171
Markdown112026

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity81.44
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes55
▷ Abstract classes23.64%
▷ Concrete classes5396.36%
▷ Final classes00.00%
Methods1,282
▷ Static methods19415.13%
▷ Public methods89569.81%
▷ Protected methods171.33%
▷ Private methods37028.86%
Functions96
▷ Named functions96100.00%
▷ Anonymous functions00.00%
Constants146
▷ Global constants9967.81%
▷ Class constants4732.19%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.17MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png7.53KB3.73KB▼ 50.49%
admin/img/Transparent-logo.png12.86KB7.30KB▼ 43.19%
assets/banner-772x250.png9.33KB4.14KB▼ 55.57%
assets/screenshot-1.png44.44KB9.27KB▼ 79.13%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%