90% wp-user-avatars

Code Review | WP User Avatars

WordPress plugin WP User Avatars scored90%from 54 tests.

About plugin

  • Plugin page: wp-user-avatars
  • Plugin version: 1.4.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Oct 15, 2015
  • Latest release: Jun 1, 2021
  • Number of updates: 26
  • Update frequency: every 79.1 days
  • Top authors: johnjamesjacoby (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

40,000+ active /272,496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.81ms] Passed 4 tests

A check of server-side resources used by WP User Avatars
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.52 ▼1.90
Dashboard /wp-admin3.34 ▼0.0145.20 ▼13.13
Posts /wp-admin/edit.php3.39 ▲0.0350.12 ▲3.54
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.96 ▼16.68
Media Library /wp-admin/upload.php3.26 ▲0.0333.41 ▲0.46

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

WP User Avatars: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.67 ▼0.911.62 ▼0.2841.25 ▲2.83
Dashboard /wp-admin2,203 ▲145.83 ▼0.05103.44 ▼1.6640.67 ▼2.36
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0338.78 ▼17.2234.28 ▼2.42
Add New Post /wp-admin/post-new.php1,514 ▼323.38 ▲5.64597.92 ▼35.0159.35 ▲7.79
Media Library /wp-admin/upload.php1,388 ▲34.22 ▼0.0096.35 ▼0.7341.36 ▼2.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: user, avatar, media, local, profile

wp-user-avatars/wp-user-avatars.php 92% from 13 tests

The principal PHP file in "WP User Avatars" v. 1.4.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("7.2" instead of "7.0")

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
No dangerous file extensions were detected823 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP10253521576
CSS2318167
JavaScript1233580

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions40
▷ Named functions3997.50%
▷ Anonymous functions12.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin