78% metronet-profile-picture

Code Review | User Profile Picture

WordPress plugin User Profile Picture scored78%from 54 tests.

About plugin

  • Plugin page: metronet-profile-...
  • Plugin version: 2.6.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: May 9, 2012
  • Latest release: Sep 28, 2023
  • Number of updates: 167
  • Update frequency: every 24.9 days
  • Top authors: ronalfy (96.41%)madalin.ungureanu (4.19%)

Code review

54 tests

User reviews

56 reviews

Install metrics

60,000+ active /822,885 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.46MB] [CPU: ▼6.78ms] Passed 4 tests

Server-side resources used by User Profile Picture
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4641.84 ▲2.34
Dashboard /wp-admin3.79 ▲0.4447.13 ▼12.87
Posts /wp-admin/edit.php3.87 ▲0.5249.96 ▼0.10
Add New Post /wp-admin/post-new.php6.34 ▲0.4586.91 ▼15.24
Media Library /wp-admin/upload.php3.71 ▲0.4838.67 ▲1.10
User Profile Picture /wp-admin/options-general.php?page=mpp3.6834.64

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for User Profile Picture
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,045 ▲28413.48 ▼0.788.49 ▲6.1638.56 ▼3.25
Dashboard /wp-admin2,343 ▲1665.57 ▼0.0987.63 ▼1.1637.03 ▼1.18
Posts /wp-admin/edit.php2,252 ▲1552.02 ▲0.0337.54 ▼1.9636.46 ▲3.45
Add New Post /wp-admin/post-new.php6,349 ▲4,82226.30 ▲3.21848.92 ▲126.5372.95 ▲8.01
Media Library /wp-admin/upload.php1,546 ▲1464.23 ▼0.0297.88 ▼23.4743.10 ▼6.68
User Profile Picture /wp-admin/options-general.php?page=mpp9792.0325.6024.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/metronet-profile-picture/gutenberg/class-gutenberg.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/metronet-profile-picture/metronet-profile-picture.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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
6 plugin tags: block, avatar, gravatar, blocks, users...

metronet-profile-picture/metronet-profile-picture.php 92% from 13 tests

"User Profile Picture" version 2.6.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("3.5" instead of "4.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin3,402 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP31374831,825
Sass23001,371
JavaScript31712140
PO File2132161
CSS3334
SVG1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity80.50
▷ Minimum class complexity72.00
▷ Maximum class complexity89.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3892.68%
▷ Protected methods00.00%
▷ Private methods37.32%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in 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/mystery.png8.17KB4.21KB▼ 48.46%