84% wp-initials-avatar

Code Review | WordPress Initial Avatars

WordPress plugin WordPress Initial Avatars scored 84% from 54 tests.

About plugin

  • Plugin page: wp-initials-avatar
  • Plugin version: 0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 4, 2017
  • Latest release: Sep 19, 2018
  • Number of updates: 14
  • Update frequency: every 25.0 days
  • Top authors: LasseRafn (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active / 1,932 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲1.53ms] Passed 4 tests

Server-side resources used by WordPress Initial Avatars
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.29 ▲4.51
Dashboard /wp-admin3.32 ▲0.0146.68 ▼2.72
Posts /wp-admin/edit.php3.37 ▲0.0148.14 ▲2.77
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.02 ▲10.54
Media Library /wp-admin/upload.php3.24 ▲0.0135.32 ▲1.55
Avatar settings /wp-admin/options-general.php?page=wp-initials-avatar/wordpress-initials-avatar.php3.2633.69

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Initial Avatars
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲3413.49 ▲0.191.75 ▲0.0145.59 ▼3.05
Dashboard /wp-admin2,226 ▲205.04 ▲0.15102.61 ▲7.2041.01 ▲4.21
Posts /wp-admin/edit.php2,117 ▲282.29 ▲0.2840.95 ▲8.2435.57 ▼0.12
Add New Post /wp-admin/post-new.php1,531 ▼223.17 ▼0.17704.04 ▼16.1236.28 ▼16.58
Media Library /wp-admin/upload.php1,408 ▲264.49 ▲0.2695.80 ▼7.2642.39 ▼4.49
Avatar settings /wp-admin/options-general.php?page=wp-initials-avatar/wordpress-initials-avatar.php1,1412.2353.3428.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-initials-avatar/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-initials-avatar/wordpress-initials-avatar.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
There were no plugin tags found

wp-initials-avatar/wordpress-initials-avatar.php 92% from 13 tests

The main PHP file in "WordPress Initial Avatars" ver. 0.9 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-initials-avatar.php" instead of "wordpress-initials-avatar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin116 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22721113
JavaScript1003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin