10% fl3r-randavatar

Code Review | FL3R Randavatar

WordPress plugin FL3R Randavatar scored10%from 54 tests.

About plugin

  • Plugin page: fl3r-randavatar
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7.1-6.0
  • WordPress version: 6.3.1
  • First release: May 27, 2015
  • Latest release: Jun 8, 2022
  • Number of updates: 15
  • Update frequency: every 171.3 days
  • Top authors: armandofiore (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,422 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/fl3r-randavatar/randavatar.php+42
    Methods with the same name as their class will not be constructors in a future version of PHP; randavatarx has a deprecated constructor

Server metrics [RAM: ▼1.60MB] [CPU: ▼63.42ms] Passed 4 tests

This is a short check of server-side resources used by FL3R Randavatar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.39 ▼1.086.81 ▼40.43
Dashboard /wp-admin2.41 ▼0.907.19 ▼54.12
Posts /wp-admin/edit.php2.41 ▼0.956.69 ▼55.74
Add New Post /wp-admin/post-new.php2.41 ▼3.486.99 ▼103.38
Media Library /wp-admin/upload.php2.41 ▼0.826.49 ▼35.03

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

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

Browser metrics Passed 4 tests

A check of browser resources used by FL3R Randavatar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,786 ▲2514.28 ▼0.081.85 ▲0.1841.89 ▲0.29
Dashboard /wp-admin2,196 ▲165.60 ▼0.0691.37 ▲3.5744.61 ▲2.67
Posts /wp-admin/edit.php2,104 ▲41.98 ▲0.0335.69 ▼3.1337.43 ▼2.40
Add New Post /wp-admin/post-new.php1,529 ▲123.22 ▲0.04652.40 ▼47.7659.39 ▲1.74
Media Library /wp-admin/upload.php1,401 ▲14.16 ▼0.0197.95 ▼16.6942.50 ▼9.83
FL3R Randavatar /wp-admin/randavatar.php260.420.1313.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/fl3r-randavatar/randavatar.php+42
    Methods with the same name as their class will not be constructors in a future version of PHP; randavatarx has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/fl3r-randavatar/randavatar.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/randavatar.php
    • > Network (severe)
    wp-admin/randavatar.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (FL3R Randavatar in comments.), #2 (FL3R Randavatar widget.), #3 (Users list with generated avatars.), #4 (Some generated avatars.)
The official readme.txt might help

fl3r-randavatar/randavatar.php 85% from 13 tests

The main file in "FL3R Randavatar" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("fl3r-randavatar.php" instead of "randavatar.php")
  • Description: The description should be shorter than 140 characters (currently 301 characters long)

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
There were no executable files found in this plugin2,009 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP1100136917
JavaScript2291512645
CSS126235
PO File16565212

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity40.00
▷ Minimum class complexity10.00
▷ Maximum class complexity70.00
Average method complexity4.71
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
106 PNG files occupy 1.64MB with 1.49MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
avatar/parts/mouth_13.png14.66KB0.29KB▼ 97.99%
avatar/parts/arms_1.png14.37KB0.11KB▼ 99.27%
avatar/parts/extra_1.png0.29KB0.11KB▼ 63.76%
avatar/parts/mouth_7.png14.71KB0.33KB▼ 97.77%
avatar/parts/eyes_16.png15.45KB0.71KB▼ 95.39%