80% custom-profile-avatar

Code Review | Custom Profile Avatar

WordPress plugin Custom Profile Avatar scored80%from 54 tests.

About plugin

  • Plugin page: custom-profile-av...
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 17, 2021
  • Latest release: Apr 3, 2023
  • Number of updates: 20
  • Update frequency: every 37.4 days
  • Top authors: en0ndev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,333 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼5.03ms] Passed 4 tests

An overview of server-side resources used by Custom Profile Avatar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1237.92 ▲0.71
Dashboard /wp-admin3.42 ▲0.0745.37 ▼10.38
Posts /wp-admin/edit.php3.53 ▲0.1848.03 ▲3.99
Add New Post /wp-admin/post-new.php6.00 ▲0.1283.77 ▼14.42
Media Library /wp-admin/upload.php3.34 ▲0.1236.22 ▲4.74

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Custom Profile Avatar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.25 ▼1.394.75 ▲2.9239.46 ▼0.94
Dashboard /wp-admin2,235 ▲495.86 ▼0.0396.95 ▼13.2480.63 ▲35.80
Posts /wp-admin/edit.php2,118 ▲292.03 ▲0.0438.45 ▲3.7837.61 ▲2.40
Add New Post /wp-admin/post-new.php1,539 ▲1117.77 ▼5.38698.45 ▲57.2352.95 ▲3.68
Media Library /wp-admin/upload.php1,417 ▲294.22 ▲0.0195.15 ▼5.8766.88 ▲23.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
    • > Notice in wp-content/plugins/custom-profile-avatar/modules/menu_setup.php+38
    Trying to get property 'roles' of non-object
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: gravatar, custom profile avatar, disable gravatar, choose avatar, change avatar...

custom-profile-avatar/index.php 92% from 13 tests

The main PHP script in "Custom Profile Avatar" version 1.3.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("custom-profile-avatar.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,039 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP13188261581
CSS15826325
JavaScript21740133

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.73
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity4.00
▷ Minimum method complexity4.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.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
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/remove.png7.08KB3.51KB▼ 50.41%
assets/img/edit.png10.33KB3.82KB▼ 63.06%
assets/img/icon.png1.25KB1.33KB0.00%
assets/img/icon-128x128.png9.85KB4.40KB▼ 55.36%