83% 0gravatar

Code Review | Display Name If No Gravatar

WordPress plugin Display Name If No Gravatar scored83%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: 6.3.1
  • 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,678 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by Display Name If No Gravatar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.66 ▼6.98
Dashboard /wp-admin3.33 ▼0.0145.26 ▼20.57
Posts /wp-admin/edit.php3.36 ▲0.0146.56 ▼3.55
Add New Post /wp-admin/post-new.php5.91 ▲0.0392.77 ▼6.05
Media Library /wp-admin/upload.php3.25 ▲0.0335.89 ▼0.11

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Display Name If No Gravatar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲1913.26 ▼1.121.80 ▼0.3638.21 ▼4.97
Dashboard /wp-admin2,209 ▲215.84 ▼0.04103.08 ▼16.2689.77 ▲46.14
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0435.16 ▼2.4833.14 ▼2.61
Add New Post /wp-admin/post-new.php1,667 ▲13921.40 ▲3.21741.52 ▲101.3356.85 ▲2.24
Media Library /wp-admin/upload.php1,388 ▼04.13 ▼0.1397.99 ▼2.1044.89 ▲0.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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)
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/0gravatar/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (A comment on my blog from a user with no gravatar.) image required
Please take inspiration from this readme.txt

0gravatar/index.php 85% from 13 tests

This is the main PHP file of "Display Name If No Gravatar" version 1.2.11.17, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • 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")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 179 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin127 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11437127

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues 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

Using a strong compression for your PNG files is a great way to speed-up your plugin
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%