93% 0gravatar

Code Review | Display Name If No Gravatar

WordPress plugin Display Name If No Gravatar scored 93% from 54 tests.

About plugin

  • Plugin page: 0gravatar
  • Plugin version: 1.2.11.17
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-3.4.2
  • WordPress version: 5.9.2
  • First release: Nov 15, 2012
  • Latest release: Nov 19, 2012
  • Number of updates: 3
  • Update frequency: every 3.0 days
  • Top authors: scheeeli (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,347 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼286.96ms] Passed 4 tests

A check of server-side resources used by Display Name If No Gravatar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0356.07 ▲2.20
Dashboard /wp-admin3.44 ▲0.0333.81 ▲0.34
Posts /wp-admin/edit.php3.67 ▲0.0338.42 ▲1.17
Add New Post /wp-admin/post-new.php6.91 ▼0.07100.45 ▼1,150.63
Media Library /wp-admin/upload.php3.32 ▲0.0226.91 ▲1.29

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: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Display Name If No Gravatar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4116.23 ▲0.266.23 ▼0.122.38 ▼0.37
Dashboard /wp-admin2,895 ▲346.24 ▲0.07118.50 ▼15.57175.17 ▲17.31
Posts /wp-admin/edit.php2,689 ▲13.12 ▼0.1160.94 ▼1.81140.22 ▼0.38
Add New Post /wp-admin/post-new.php1,666 ▼1321.99 ▲5.08397.98 ▼15.81192.02 ▲31.73
Media Library /wp-admin/upload.php1,696 ▼55.55 ▲0.00127.15 ▼15.78237.16 ▲41.32

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/0gravatar/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

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
These attributes need your attention:
  • Screenshots: Screenshot #1 (A comment on my blog from a user with no gravatar.) image required
The official readme.txt is a good inspiration

0gravatar/index.php 85% from 13 tests

The primary PHP file in "Display Name If No Gravatar" version 1.2.11.17 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 179 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("0gravatar.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected127 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11437127

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions6
▷ Named functions6100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png3.73KB3.67KB▼ 1.36%