83% users-profile-picture

Code Review | User Profile Picture

WordPress plugin User Profile Picture scored83%from 54 tests.

About plugin

  • Plugin page: users-profile-pic...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 24, 2019
  • Latest release: Sep 3, 2022
  • Number of updates: 8
  • Update frequency: every 134.4 days
  • Top authors: dewtechnolab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /6,010 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.03MB] [CPU: ▼2.69ms] Passed 4 tests

Analyzing server-side resources used by User Profile Picture
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.36 ▼2.85
Dashboard /wp-admin3.34 ▲0.0361.58 ▲4.67
Posts /wp-admin/edit.php3.46 ▲0.1053.82 ▲0.11
Add New Post /wp-admin/post-new.php5.92 ▲0.0397.89 ▼4.03
Media Library /wp-admin/upload.php3.24 ▲0.0137.83 ▼3.99

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by User Profile Picture
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲16714.47 ▼0.081.79 ▼0.3450.07 ▲3.76
Dashboard /wp-admin2,334 ▲1606.17 ▲0.55127.11 ▲29.0744.53 ▲4.95
Posts /wp-admin/edit.php2,262 ▲1593.29 ▲1.3256.89 ▲20.1239.67 ▲5.63
Add New Post /wp-admin/post-new.php1,528 ▼023.26 ▲2.33738.44 ▲52.8741.93 ▼9.46
Media Library /wp-admin/upload.php1,399 ▲24.17 ▲0.0190.95 ▼42.1842.53 ▼9.20

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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
Even though no errors were found, this is by no means 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/users-profile-picture/dew-profile-picture.php:194

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: avatar, user, users, user profile

users-profile-picture/dew-profile-picture.php 69% from 13 tests

This is the main PHP file of "User Profile Picture" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("users-profile-picture.php" instead of "dew-profile-picture.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.5.0" instead of "4.5")
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected169 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21582134
JavaScript18435

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.43
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/placeholder.png8.17KB4.21KB▼ 48.46%