84% wp-user-profile-avatar

Code Review | WP User Profile Avatar

WordPress plugin WP User Profile Avatar scored84%from 54 tests.

About plugin

  • Plugin page: wp-user-profile-a...
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.8.1
  • WordPress version: 6.3.1
  • First release: May 22, 2020
  • Latest release: Oct 26, 2021
  • Number of updates: 18
  • Update frequency: every 28.9 days
  • Top authors: wpeventmanager (94.44%)hiteshmakvana (11.11%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10,000+ active /41,577 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▲2.25ms] Passed 4 tests

An overview of server-side resources used by WP User Profile Avatar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1148.16 ▼2.30
Dashboard /wp-admin3.41 ▲0.1050.24 ▲1.81
Posts /wp-admin/edit.php3.46 ▲0.1054.00 ▲6.79
Add New Post /wp-admin/post-new.php6.01 ▲0.1289.61 ▲3.65
Media Library /wp-admin/upload.php3.33 ▲0.1039.87 ▲5.82
Profile Avatar Settings /wp-admin/users.php?page=wp-user-profile-avatar-settings3.3246.96

Server storage [IO: ▲0.36MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 42 new files
Database: no new tables, 11 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
wpupa_version
wpupa_rating
wpupa_default
wpupa_tinymce
...

Browser metrics Passed 4 tests

WP User Profile Avatar: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲10613.36 ▼1.401.78 ▼0.2743.21 ▲3.54
Dashboard /wp-admin2,212 ▲245.79 ▲0.79103.89 ▼3.8138.30 ▼5.88
Posts /wp-admin/edit.php2,106 ▲172.07 ▲0.0742.63 ▲3.4136.49 ▲1.46
Add New Post /wp-admin/post-new.php1,524 ▲523.37 ▲0.19669.45 ▲2.1160.48 ▼11.90
Media Library /wp-admin/upload.php1,405 ▲144.24 ▲0.0894.13 ▼1.2443.55 ▲2.21
Profile Avatar Settings /wp-admin/users.php?page=wp-user-profile-avatar-settings1,1853.2443.7256.71

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-user-profile-avatar/admin/templates/shortcode-popup.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-user-profile-avatar/shortcodes/wp-user-profile-avatar-shortcodes.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: avatar, custom profile picture, user profile, author photo, profile picture...

wp-user-profile-avatar/wp-user-profile-avatar.php Passed 13 tests

"WP User Profile Avatar" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
22 characters long description:
WP User Profile Avatar

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,806 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PO File74625951,429
PHP112803871,100
JavaScript47182236
CSS41039
Markdown1202

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.50
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.14MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wp-user-medium.png33.74KB7.35KB▼ 78.23%
assets/images/wp-user-admin.png22.66KB2.81KB▼ 87.62%
assets/images/wp-user-original.png43.93KB10.77KB▼ 75.50%
assets/images/wp-user-thumbnail.png25.31KB3.95KB▼ 84.41%
assets/images/wp-user-avatar.png19.45KB1.30KB▼ 93.32%