84% validate-gravatar

Code Review | Validate Gravatar

WordPress plugin Validate Gravatar scored84%from 54 tests.

About plugin

  • Plugin page: validate-gravatar
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Feb 19, 2014
  • Latest release: Mar 5, 2014
  • Number of updates: 13
  • Update frequency: every 1.2 days
  • Top authors: eflyjason (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,900 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by Validate Gravatar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.46 ▼3.04
Dashboard /wp-admin3.31 ▲0.0053.06 ▼0.01
Posts /wp-admin/edit.php3.36 ▲0.0051.63 ▼5.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.40 ▼2.76
Media Library /wp-admin/upload.php3.23 ▲0.0037.67 ▲0.49

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Validate Gravatar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.25 ▼1.375.55 ▲3.6442.55 ▼0.69
Dashboard /wp-admin2,200 ▲95.79 ▲0.88100.26 ▼2.6337.34 ▼11.66
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0441.78 ▲1.0535.28 ▼3.53
Add New Post /wp-admin/post-new.php1,533 ▲1923.09 ▲5.54664.59 ▼13.7460.22 ▼5.12
Media Library /wp-admin/upload.php1,391 ▼04.27 ▲0.07100.03 ▼10.5244.91 ▼1.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/validate-gravatar/validate-gravatar.php:32

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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
2 plugin tags: validate, gravatar

validate-gravatar/validate-gravatar.php Passed 13 tests

"Validate Gravatar" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
81 characters long description:
Check if the Email's Gravatar is exist. 檢測指定郵箱的Gravatar是否存在

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin15 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1102115

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin