94% 3d-avatar-user-profile

Code Review | 3D Avatar User Profile

WordPress plugin 3D Avatar User Profile scored 94% 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: 5.9.2
  • 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 / 132 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼300.39ms] Passed 4 tests

Analyzing server-side resources used by 3D Avatar User Profile
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0356.58 ▲4.02
Dashboard /wp-admin3.44 ▲0.0436.26 ▼34.02
Posts /wp-admin/edit.php3.67 ▲0.0344.60 ▲6.24
Add New Post /wp-admin/post-new.php6.91 ▼0.0699.14 ▼1,175.07
Media Library /wp-admin/upload.php3.32 ▲0.0328.52 ▲3.53

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, no new options

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 /3,795 ▲7215.89 ▲0.606.11 ▼0.082.83 ▲0.64
Dashboard /wp-admin2,892 ▲316.15 ▼0.02116.95 ▼14.39180.29 ▲11.19
Posts /wp-admin/edit.php2,691 ▼03.24 ▲0.0061.81 ▼34.71145.71 ▼3.48
Add New Post /wp-admin/post-new.php1,779 ▲8921.59 ▲0.91457.57 ▼24.26192.36 ▲31.03
Media Library /wp-admin/upload.php1,698 ▼05.51 ▼0.02132.03 ▼17.81183.70 ▼8.00

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

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 | 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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > 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
    • > 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

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 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (19 tag instead of maximum 10)
You can take inspiration from this readme.txt

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

The entry point to "3D Avatar User Profile" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
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

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
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

All PNG images should be compressed to minimize bandwidth usage for end users
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-3.png158.15KB53.51KB▼ 66.17%
screenshot-2.png92.42KB31.73KB▼ 65.66%
screenshot-1.png72.17KB23.69KB▼ 67.17%