83% better-admin-users-search

Code Review | Better Admin Users Search

WordPress plugin Better Admin Users Search scored83%from 54 tests.

About plugin

  • Plugin page: better-admin-user...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.7.2
  • WordPress version: 6.3.1
  • First release: Apr 9, 2019
  • Latest release: Jun 10, 2021
  • Number of updates: 15
  • Update frequency: every 53.0 days
  • Top authors: pommelo (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /2,211 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.70MB] [CPU: ▼3.76ms] Passed 4 tests

An overview of server-side resources used by Better Admin Users Search
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4436.27 ▲0.95
Dashboard /wp-admin4.10 ▲0.7950.92 ▼0.18
Posts /wp-admin/edit.php4.18 ▲0.8252.09 ▲6.68
Add New Post /wp-admin/post-new.php6.68 ▲0.7985.93 ▼22.47
Media Library /wp-admin/upload.php4.02 ▲0.7943.71 ▲13.49
Better Admin Users Search /wp-admin/options-general.php?page=baus_options4.4039.95

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 456 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
baus_options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Better Admin Users Search
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.42 ▼0.131.92 ▲0.4441.24 ▲5.25
Dashboard /wp-admin2,207 ▲365.62 ▲0.0683.61 ▼6.0139.21 ▲2.77
Posts /wp-admin/edit.php2,115 ▲122.07 ▲0.0540.17 ▼2.2335.86 ▼3.58
Add New Post /wp-admin/post-new.php1,536 ▼123.11 ▲4.92686.87 ▲78.5751.70 ▼15.34
Media Library /wp-admin/upload.php1,415 ▲154.31 ▲0.17114.50 ▲17.7748.17 ▲6.25
Better Admin Users Search /wp-admin/options-general.php?page=baus_options1,0172.5141.5732.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Please fix the following items
  • 41× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/better-admin-users-search/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Multicheck' not found in wp-content/plugins/better-admin-users-search/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/better-admin-users-search/vendor/cmb2/cmb2/includes/types/CMB2_Type_Picker_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Select' not found in wp-content/plugins/better-admin-users-search/vendor/cmb2/cmb2/includes/types/CMB2_Type_Select_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/better-admin-users-search/vendor/cmb2/cmb2/includes/types/CMB2_Type_Text_Date.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup' not found in wp-content/plugins/better-admin-users-search/vendor/cmb2/cmb2/includes/CMB2_Options_Hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/better-admin-users-search/vendor/cmb2/cmb2/includes/types/CMB2_Type_Wysiwyg.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Select' not found in wp-content/plugins/better-admin-users-search/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Select_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/better-admin-users-search/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-admin-users-search/vendor/cmb2/cmb2/example-functions.php:105

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: admin, users, meta, search, usermeta...

better-admin-users-search/better-admin-users-search.php 77% from 13 tests

The main file in "Better Admin Users Search" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("i18n")
  • Domain Path: The domain path must begin with a forward slash character ("/i18n")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin52,996 lines of code in 293 files:
LanguageFilesBlank linesComment linesLines of code
PO File12114,32918,52332,363
PHP762,3636,6728,180
CSS153871,2095,244
JavaScript561,0261,1984,772
Sass17306291,411
Markdown32440755
JSON400216
Bourne Shell124055

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity18.97
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes75
▷ Abstract classes912.00%
▷ Concrete classes6688.00%
▷ Final classes00.00%
Methods587
▷ Static methods10718.23%
▷ Public methods48983.30%
▷ Protected methods8915.16%
▷ Private methods91.53%
Functions45
▷ Named functions4088.89%
▷ Anonymous functions511.11%
Constants13
▷ Global constants753.85%
▷ Class constants646.15%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
20 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
vendor/podkot/cmb-field-select2/js/select2/select2x2.png0.83KB0.77KB▼ 6.15%
vendor/cmb2/cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
vendor/cmb2/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
vendor/cmb2/cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%