84% 3d-avatar-user-profile

Code Review | 3D Avatar User Profile

WordPress plugin 3D Avatar User Profile scored84%from 54 tests.

About plugin

  • Plugin page: 3d-avatar-user-pr...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.8
  • WordPress version: 6.3.1
  • First release: Dec 30, 2021
  • Latest release: Jan 28, 2022
  • Number of updates: 9
  • Update frequency: every 3.2 days
  • Top authors: enricocantori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /801 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▲1.60ms] Passed 4 tests

This is a short check of server-side resources used by 3D Avatar User Profile
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.73 ▼1.87
Dashboard /wp-admin3.33 ▲0.0351.77 ▼2.12
Posts /wp-admin/edit.php3.38 ▲0.0358.67 ▲9.61
Add New Post /wp-admin/post-new.php5.91 ▲0.03103.24 ▲6.48
Media Library /wp-admin/upload.php3.25 ▲0.0343.81 ▲3.92

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for 3D Avatar User Profile
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.58 ▼0.801.81 ▼0.0942.99 ▲1.02
Dashboard /wp-admin2,221 ▲184.84 ▼1.03106.11 ▲4.5540.22 ▼4.17
Posts /wp-admin/edit.php2,100 ▼02.04 ▲0.0338.56 ▲0.0734.12 ▼0.94
Add New Post /wp-admin/post-new.php1,545 ▲1923.15 ▲5.45688.10 ▲34.0754.04 ▼14.12
Media Library /wp-admin/upload.php1,397 ▼64.25 ▼0.02114.79 ▲15.0348.06 ▲4.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/3d-avatar-user-profile/avatar-3d-user-profile.php:14
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/3d-avatar-user-profile/avatar-3d-user-profile.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (19 tag instead of maximum 10)
The official readme.txt is a good inspiration

3d-avatar-user-profile/avatar-3d-user-profile.php 92% from 13 tests

"3D Avatar User Profile" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("3d-avatar-user-profile.php" instead of "avatar-3d-user-profile.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin3,511 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71,8973382,912
PHP112533488
CSS1150111

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity89.00
▷ Minimum class complexity89.00
▷ Maximum class complexity89.00
Average method complexity4.83
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.32MB with 0.21MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png92.42KB31.73KB▼ 65.66%
screenshot-1.png72.17KB23.69KB▼ 67.17%
screenshot-3.png158.15KB53.51KB▼ 66.17%