89% manage-user-avatar

Code Review | Manage User Avatar

WordPress plugin Manage User Avatar scored89%from 54 tests.

About plugin

  • Plugin page: manage-user-avatar
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7
  • WordPress version: 6.3.1
  • First release: Apr 11, 2021
  • Latest release: Apr 11, 2021
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: escaleta (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /884 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.36ms] Passed 4 tests

A check of server-side resources used by Manage User Avatar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.41 ▼3.77
Dashboard /wp-admin3.32 ▲0.0149.01 ▼3.92
Posts /wp-admin/edit.php3.37 ▲0.0149.80 ▼4.94
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.75 ▼12.81
Media Library /wp-admin/upload.php3.24 ▲0.0137.21 ▲3.61

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Manage User Avatar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.35 ▲0.002.01 ▲0.3145.97 ▲2.19
Dashboard /wp-admin2,195 ▲155.64 ▼0.0281.63 ▼10.0759.93 ▲19.13
Posts /wp-admin/edit.php2,106 ▲31.98 ▲0.0138.35 ▼1.6234.23 ▲0.27
Add New Post /wp-admin/post-new.php1,541 ▲422.96 ▲4.67756.20 ▲121.6054.85 ▼15.39
Media Library /wp-admin/upload.php1,397 ▼34.20 ▲0.0297.62 ▼15.6279.38 ▲33.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed: You can take inspiration from this readme.txt

manage-user-avatar/ss_wp_user_avatar.php 85% from 13 tests

This is the main PHP file of "Manage User Avatar" version 0.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 190 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("manage-user-avatar.php" instead of "ss_wp_user_avatar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected32 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1111332

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.69
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
26 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/avatars/alphabets/z.png2.79KB0.85KB▼ 69.72%
assets/avatars/alphabets/p.png2.50KB0.89KB▼ 64.38%
assets/avatars/alphabets/x.png3.98KB1.56KB▼ 60.86%
assets/avatars/alphabets/c.png4.16KB1.75KB▼ 57.91%
assets/avatars/alphabets/j.png2.41KB0.85KB▼ 64.60%