78% better-gravatar-generated-icons

Code Review | Better Gravatar generated icons

WordPress plugin Better Gravatar generated icons scored78%from 54 tests.

About plugin

  • Plugin page: better-gravatar-g...
  • Plugin version: 1...
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7
  • WordPress version: 6.3.1
  • First release: Apr 11, 2017
  • Latest release: Apr 7, 2017
  • Number of updates: 21
  • Update frequency: every 0.1 days
  • Top authors: ginoplusio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /982 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.19MB] [CPU: ▼16.59ms] Passed 4 tests

Server-side resources used by Better Gravatar generated icons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0629.16 ▼15.80
Dashboard /wp-admin3.13 ▼0.1734.20 ▼19.93
Posts /wp-admin/edit.php3.26 ▼0.0936.29 ▼18.67
Add New Post /wp-admin/post-new.php5.46 ▼0.4383.35 ▼11.96
Media Library /wp-admin/upload.php3.20 ▼0.0336.78 ▲2.65
Better Avatar /wp-admin/options-general.php?page=betavat-menu-settings3.1132.35

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Better Gravatar generated icons: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲8813.46 ▼0.929.02 ▲6.9544.37 ▼0.03
Dashboard /wp-admin2,200 ▲235.58 ▲0.0284.45 ▼19.5166.25 ▲18.42
Posts /wp-admin/edit.php2,108 ▲82.01 ▲0.0538.99 ▲0.9731.46 ▼3.74
Add New Post /wp-admin/post-new.php1,687 ▲16122.09 ▼1.03756.26 ▲54.3570.08 ▲7.94
Media Library /wp-admin/upload.php1,402 ▼14.26 ▲0.06101.13 ▲2.3073.08 ▲29.60
Better Avatar /wp-admin/options-general.php?page=betavat-menu-settings8562.0426.2825.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=betavat-menu-settings
    • > Notice in wp-content/plugins/better-gravatar-generated-icons/index.php+56
    Undefined variable: newavatar

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-gravatar-generated-icons/index.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === better-gravatar-generated-icons === )
Please take inspiration from this readme.txt

better-gravatar-generated-icons/index.php 85% from 13 tests

The main file in "Better Gravatar generated icons" v. 1... serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("better-gravatar-generated-icons.php" instead of "index.php")
  • Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "1...")

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
Everything looks great! No dangerous files found in this plugin108 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1251478
JavaScript16028
CSS1002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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