10% avatar-shaper

Code Review | Avatar Shaper

WordPress plugin Avatar Shaper scored10%from 54 tests.

About plugin

  • Plugin page: avatar-shaper
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.1
  • WordPress version: 6.3.1
  • First release: Jan 17, 2015
  • Latest release: Jan 17, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: andreyonadam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,489 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/avatar-shaper/includes/classreplace.php+9
    Undefined variable: agent

Server metrics [RAM: ▼1.97MB] [CPU: ▼54.87ms] Passed 4 tests

An overview of server-side resources used by Avatar Shaper
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.443.90 ▼39.06
Dashboard /wp-admin2.05 ▼1.305.46 ▼53.66
Posts /wp-admin/edit.php2.05 ▼1.316.83 ▼40.49
Add New Post /wp-admin/post-new.php2.05 ▼3.845.47 ▼86.26
Media Library /wp-admin/upload.php2.05 ▼1.185.70 ▼30.82
Avatar Shaper /wp-admin/options-general.php?page=avatar-shaper2.056.01

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Avatar Shaper
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7714.43 ▲0.081.73 ▲0.0937.57 ▼6.16
Dashboard /wp-admin2,218 ▲445.77 ▲0.1886.13 ▼1.0238.21 ▼0.49
Posts /wp-admin/edit.php2,128 ▲282.29 ▲0.2637.00 ▲0.0629.66 ▼0.47
Add New Post /wp-admin/post-new.php1,552 ▲2623.29 ▲0.29714.93 ▲19.3739.45 ▼19.71
Media Library /wp-admin/upload.php1,423 ▲264.45 ▲0.2394.85 ▼12.2341.14 ▼6.02
Avatar Shaper /wp-admin/options-general.php?page=avatar-shaper1,0412.3771.8130.94

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the registeravatarcss handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=avatar-shaper
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the registeravatarcss handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=avatar-shaper
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the registerjquerystyleavatar handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=avatar-shaper
    • > Notice in wp-content/plugins/avatar-shaper/includes/classreplace.php+9
    Undefined variable: agent
    • > GET request to /wp-admin/options-general.php?page=avatar-shaper
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=avatar-shaper
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=avatar-shaper
    • > Notice in wp-content/plugins/avatar-shaper/includes/avataroptions.php+176
    Undefined variable: html

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/avatar-shaper/includes/classreplace.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/avatar-shaper/avatarshaper.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avatar-shaper/includes/avataroptions.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=avatar-shaper
    • > Network (severe)
    wp-content/plugins/avatar-shaper/includes/images/ui-bg_glass_75_e6e6e6_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Screenshot #3 (Options page.) image not found
The official readme.txt might help

avatar-shaper/avatarshaper.php 92% from 13 tests

The main PHP file in "Avatar Shaper" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("avatar-shaper.php" instead of "avatarshaper.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,720 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS234491,095
PHP41230535
SVG82880
JavaScript2102110

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
10 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/diamond.png5.52KB3.15KB▼ 42.86%
img/burst.png5.65KB3.30KB▼ 41.62%
img/imagegloss.png5.86KB2.88KB▼ 50.91%
img/octagon.png2.36KB1.09KB▼ 53.87%
img/heptagon.png2.54KB1.24KB▼ 51.00%