78% amr-users

Code Review | amr users

WordPress plugin amr users scored 78% from 54 tests.

About plugin

  • Plugin page: amr-users
  • Plugin version: 4.59.4
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Jul 31, 2009
  • Latest release: Mar 31, 2022
  • Number of updates: 391
  • Update frequency: every 11.9 days
  • Top authors: anmari (100%)

Code review

54 tests

User reviews

49 reviews

Install metrics

2,000+ active / 189,643 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.55MB] [CPU: ▼304.14ms] 75% from 4 tests

Server-side resources used by amr users
Please fix the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,274.33ms on /wp-admin/admin.php?page=user-add-ons)
PageMemory (MB)CPU Time (ms)
Home /5.04 ▲1.5290.58 ▲26.36
Dashboard /wp-admin4.97 ▲1.5752.44 ▲8.20
Posts /wp-admin/edit.php5.20 ▲1.5655.07 ▲4.51
Add New Post /wp-admin/post-new.php8.50 ▲1.54118.47 ▼1,245.45
Media Library /wp-admin/upload.php4.92 ▲1.6352.68 ▲16.20
User lists /wp-admin/users.php?page=userlists4.9149.16
General & about /wp-admin/admin.php?page=amr-users4.8441.32
Add ons /wp-admin/admin.php?page=user-add-ons5.071,274.33
+ updates /wp-admin/admin.php?page=amr_updates_page4.8355.65

Server storage [IO: ▲0.78MB] [DB: ▲0.04MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 46 new files
Database: 2 new tables, 4 new options
New tables
wp_amr_reportcache
wp_amr_reportcachelogging
New WordPress options
amr-users-main
amr-users-save-prefix
widget_amr_users_widget
amr-users

Browser metrics Passed 4 tests

Checking browser requirements for amr users
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,904 ▲16215.81 ▲0.178.10 ▲0.493.00 ▲0.06
Dashboard /wp-admin2,999 ▲1126.40 ▼0.03183.62 ▼14.65196.95 ▼17.88
Posts /wp-admin/edit.php2,770 ▲853.43 ▼0.0281.23 ▼1.08174.08 ▼9.44
Add New Post /wp-admin/post-new.php1,686 ▲9216.85 ▼3.48607.38 ▼48.49203.62 ▼11.40
Media Library /wp-admin/upload.php1,773 ▲815.72 ▲0.02189.65 ▼0.70267.91 ▲9.26
User lists /wp-admin/users.php?page=userlists1,1002.6869.55123.70
General & about /wp-admin/admin.php?page=amr-users1,3053.0268.10157.62
Add ons /wp-admin/admin.php?page=user-add-ons2,5682.5767.65135.99
Excluded Meta Keys /wp-admin/ameta-admin-meta-keys.php261.140.0429.64
Configure a list /wp-admin/ameta-admin-configure.php261.140.0816.41
Cacheing /wp-admin/ameta-admin-cache-settings.php261.140.0516.32
Users: Directory /wp-admin/ameta-list.php?ulist=2261.140.0517.00
Users: Details /wp-admin/ameta-list.php?ulist=1261.140.0519.57
Overview & tools /wp-admin/ameta-admin-overview.php261.140.0515.83
+ updates /wp-admin/admin.php?page=amr_updates_page1,0562.6268.62121.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 3 options in the database
    • amr-users-main
    • amr-users-save-prefix
    • widget_amr_users_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_widget' not found in wp-content/plugins/amr-users/includes/amr-users-widget.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/amr-users/includes/ameta-includes.php:841
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/amr-users/includes/ameta-upgrades.php:230
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/amr-users/includes/ameta-includes.php:841
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/amr-users/amr-users.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/amr-users/includes/ameta-admin-prefix-check.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/ameta-admin-meta-keys.php
    • > Network (severe)
    wp-admin/ameta-admin-meta-keys.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/ameta-admin-configure.php
    • > Network (severe)
    wp-admin/ameta-admin-configure.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/ameta-admin-cache-settings.php
    • > Network (severe)
    wp-admin/ameta-admin-cache-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/ameta-list.php?ulist=2
    • > Network (severe)
    wp-admin/ameta-list.php?ulist=2 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/ameta-list.php?ulist=1
    • > Network (severe)
    wp-admin/ameta-list.php?ulist=1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/ameta-admin-overview.php
    • > Network (severe)
    wp-admin/ameta-admin-overview.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please describe screenshot #13 in amr-users/assets to your readme.txt
You can look at the official readme.txt

amr-users/amr-users.php 92% from 13 tests

The main PHP file in "amr users" ver. 4.59.4 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 293 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin12,336 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP311,9211,3639,288
PO File21,1802,0022,623
CSS35879425

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity33.50
▷ Minimum class complexity3.00
▷ Maximum class complexity72.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods45
▷ Static methods00.00%
▷ Public methods4293.33%
▷ Protected methods00.00%
▷ Private methods36.67%
Functions327
▷ Named functions32599.39%
▷ Anonymous functions20.61%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/xls.png1.30KB1.35KB0.00%
images/file_export.png0.87KB0.98KB0.00%
images/spreadsheetrebuild.png1.30KB1.35KB0.00%
images/rebuild.png1.28KB1.39KB0.00%