10% superhero-avatars

Code Review | Superhero Avatars

WordPress plugin Superhero Avatars scored10%from 54 tests.

About plugin

  • Plugin page: superhero-avatars
  • Plugin version: 1.0-RC1...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.1
  • WordPress version: 6.3.1
  • First release: Feb 4, 2015
  • Latest release: Feb 4, 2015
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: technosailor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /920 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
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/superhero-avatars/superhero-avatars.php+26
    array_key_exists() expects parameter 2 to be array, bool given

Server metrics [RAM: ▼1.91MB] [CPU: ▼52.20ms] Passed 4 tests

Server-side resources used by Superhero Avatars
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.96 ▼32.80
Dashboard /wp-admin2.09 ▼1.219.96 ▼37.26
Posts /wp-admin/edit.php2.09 ▼1.267.26 ▼42.73
Add New Post /wp-admin/post-new.php2.09 ▼3.795.88 ▼96.00
Media Library /wp-admin/upload.php2.09 ▼1.147.00 ▼24.34
Superhero Avatars /wp-admin/options-general.php?page=superhero-options2.096.28

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Superhero Avatars: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲10113.22 ▼1.434.95 ▲3.3242.33 ▲1.74
Dashboard /wp-admin2,230 ▲424.94 ▲0.0395.26 ▼9.0367.34 ▲24.08
Posts /wp-admin/edit.php2,110 ▲211.98 ▼0.0035.77 ▼4.7833.70 ▼4.39
Add New Post /wp-admin/post-new.php1,681 ▲14822.14 ▼1.19735.58 ▲100.6258.82 ▼0.34
Media Library /wp-admin/upload.php1,393 ▲24.26 ▲0.0394.07 ▼7.8282.45 ▲41.56
Superhero Avatars /wp-admin/options-general.php?page=superhero-options8022.0624.8425.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/superhero-avatars/superhero-avatars.php+26
    array_key_exists() expects parameter 2 to be array, bool given
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=superhero-options
    • > Warning in wp-content/plugins/superhero-avatars/superhero-avatars.php+27
    array_key_exists() expects parameter 2 to be array, bool given
    • > GET request to /wp-admin/options-general.php?page=superhero-options
    • > Notice in wp-content/plugins/superhero-avatars/superhero-avatars.php+91
    Undefined index: _wp_superhero_nonce
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=superhero-options
    • > Notice in wp-content/plugins/superhero-avatars/superhero-avatars.php+161
    Undefined property: stdClass::$data
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=superhero-options
    • > Notice in wp-content/plugins/superhero-avatars/superhero-avatars.php+161
    Trying to get property 'results' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=superhero-options
    • > Warning in wp-content/plugins/superhero-avatars/superhero-avatars.php+163
    Invalid argument supplied for foreach()
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=superhero-options
    • > Warning in wp-content/plugins/superhero-avatars/superhero-avatars.php+120
    array_rand(): Array is empty
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=superhero-options
    • > Notice in wp-content/plugins/superhero-avatars/superhero-avatars.php+120
    Undefined index:
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=superhero-options
    • > Notice in wp-content/plugins/superhero-avatars/superhero-avatars.php+122
    Trying to get property 'thumbnail' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=superhero-options
    • > Notice in wp-content/plugins/superhero-avatars/superhero-avatars.php+121
    Trying to get property 'extension' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=superhero-options
    • > Notice in wp-content/plugins/superhero-avatars/superhero-avatars.php+122
    Trying to get property 'path' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=superhero-options
    • > Notice in wp-content/plugins/superhero-avatars/superhero-avatars.php+130
    Trying to get property 'name' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/superhero-avatars/superhero-avatars.php:24

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=superhero-options
    • > Network (severe)
    http://./ - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: comments, avatars

superhero-avatars/superhero-avatars.php 92% from 13 tests

The primary PHP file in "Superhero Avatars" version 1.0-RC1... is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "1.0-RC1...")

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 plugin121 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12747104
Markdown18017

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.23
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
PNG images were not found in this plugin