84% local-gravatars

Code Review | Local Gravatars

WordPress plugin Local Gravatars scored84%from 54 tests.

About plugin

  • Plugin page: local-gravatars
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.5
  • WordPress version: 6.3.1
  • First release: Oct 7, 2020
  • Latest release: Oct 12, 2020
  • Number of updates: 3
  • Update frequency: every 2.0 days
  • Top authors: aristath (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,102 total downloads

Benchmarks

Plugin footprint 82% 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.05MB] [CPU: ▼9.39ms] Passed 4 tests

Analyzing server-side resources used by Local Gravatars
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1570.38 ▲28.50
Dashboard /wp-admin3.35 ▲0.0548.79 ▼4.20
Posts /wp-admin/edit.php3.43 ▲0.0843.33 ▼7.80
Add New Post /wp-admin/post-new.php5.93 ▲0.0584.17 ▼24.70
Media Library /wp-admin/upload.php3.27 ▲0.0436.15 ▼0.85

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
It is recommended to fix the following issues
  • Illegal file modification found: 2 files (11.41KB) outside of "wp-content/plugins/local-gravatars/" and "wp-content/uploads/"
    • (new file) wp-content/gravatars/d7a973c7dab26985da5f961be7b74480
    • (new file) wp-content/gravatars/dda8de772f53e64b26129d7f632ad1a3
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Local Gravatars
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.35 ▼0.221.94 ▲0.2640.89 ▼3.27
Dashboard /wp-admin2,198 ▲215.59 ▲0.0688.12 ▼15.2438.26 ▼4.24
Posts /wp-admin/edit.php2,097 ▼02.02 ▲0.0739.02 ▲3.4033.00 ▼2.25
Add New Post /wp-admin/post-new.php1,526 ▼021.08 ▼2.04684.45 ▲58.7745.48 ▼12.34
Media Library /wp-admin/upload.php1,400 ▲34.20 ▼0.01105.43 ▲1.8247.88 ▲3.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Aristath\\LocalGravatars\\add_filter() in wp-content/plugins/local-gravatars/local-gravatars.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
No tags were found

local-gravatars/local-gravatars.php 92% from 13 tests

The primary PHP file in "Local Gravatars" version 1.0.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.5" instead of "5.3")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected120 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP137185120

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods110.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin