84% disable-user-gravatar

Code Review | Disable User Gravatar

WordPress plugin Disable User Gravatar scored84%from 54 tests.

About plugin

  • Plugin page: disable-user-grav...
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.1
  • WordPress version: 6.3.1
  • First release: Dec 8, 2009
  • Latest release: Nov 1, 2022
  • Number of updates: 26
  • Update frequency: every 181.2 days
  • Top authors: netweblogic (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

3,000+ active /35,680 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

An overview of server-side resources used by Disable User Gravatar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.42 ▼5.25
Dashboard /wp-admin3.32 ▼0.0344.64 ▼11.05
Posts /wp-admin/edit.php3.37 ▲0.0148.36 ▲6.80
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.45 ▼13.02
Media Library /wp-admin/upload.php3.24 ▲0.0136.68 ▲0.64

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Disable User Gravatar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.391.54 ▼0.0840.85 ▼2.32
Dashboard /wp-admin2,209 ▲186.05 ▲1.1598.64 ▼10.7441.02 ▲5.70
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0140.71 ▲0.2234.47 ▼0.03
Add New Post /wp-admin/post-new.php1,542 ▼018.24 ▲0.08655.52 ▲43.4960.02 ▲3.64
Media Library /wp-admin/upload.php1,385 ▼34.10 ▼0.11109.19 ▲14.5147.79 ▲5.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-user-gravatar/disable-user-gravatar.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/disable-user-gravatar/disable-user-gravatar-admin.php:6

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: wordpress, avatar, wpmu, wire, wordpress mu...

disable-user-gravatar/disable-user-gravatar.php Passed 13 tests

The primary PHP file in "Disable User Gravatar" version 3.1 is used by WordPress to initiate all plugin functionality
92 characters long description:
Stops wordpress from automatically grabbing the users' gravatar with their registered email.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin93 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2172993

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.39
Average class complexity9.50
▷ Minimum class complexity3.00
▷ Maximum class complexity16.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods8100.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
default-gravatar.png0.19KB0.08KB▼ 57.73%