79% libravatar-replace

Code Review | Libravatar Replace

WordPress plugin Libravatar Replace scored79%from 54 tests.

About plugin

  • Plugin page: libravatar-replace
  • Plugin version: 3.3.0
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.1
  • WordPress version: 6.3.1
  • First release: Aug 25, 2013
  • Latest release: Dec 20, 2022
  • Number of updates: 49
  • Update frequency: every 69.5 days
  • Top authors: sunchaserinfo (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active /16,420 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▲119.62ms] Passed 4 tests

Analyzing server-side resources used by Libravatar Replace
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.11153.03 ▲112.94
Dashboard /wp-admin3.41 ▲0.06472.70 ▲409.77
Posts /wp-admin/edit.php3.52 ▲0.16181.33 ▲127.46
Add New Post /wp-admin/post-new.php5.99 ▲0.10219.40 ▲118.47
Media Library /wp-admin/upload.php3.33 ▲0.10152.99 ▲119.60
Libravatar /wp-admin/options-general.php?page=libravatar-replace3.30150.00

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Libravatar Replace
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,783 ▲2214.41 ▲0.051.90 ▲0.3440.64 ▼1.43
Dashboard /wp-admin2,187 ▲105.66 ▼0.0090.83 ▼2.0963.95 ▲25.52
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0435.64 ▼0.2834.99 ▼0.78
Add New Post /wp-admin/post-new.php1,683 ▲14722.11 ▲3.86713.69 ▲69.2856.72 ▼15.17
Media Library /wp-admin/upload.php1,395 ▼54.12 ▼0.0898.69 ▼5.6675.16 ▲26.98
Libravatar /wp-admin/options-general.php?page=libravatar-replace8132.1224.1825.68

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/libravatar-replace/libravatar-replace.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Libravatar' not found in wp-content/plugins/libravatar-replace/classes/ServicesLibravatarExt.class.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ServicesLibravatarExt' not found in wp-content/plugins/libravatar-replace/classes/ServicesLibravatarCached.class.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/libravatar-replace/views/admin.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
7 plugin tags: avatar, email, buddypress, libravatar, picture...

libravatar-replace/libravatar-replace.php Passed 13 tests

Analyzing the main PHP file in "Libravatar Replace" version 3.3.0
47 characters long description:
Libravatar support for WordPress and BuddyPress

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
Good job! No executable or dangerous file extensions detected631 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7143469541
Markdown140062
PO File16628

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity24.75
▷ Minimum class complexity5.00
▷ Maximum class complexity66.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods36
▷ Static methods12.78%
▷ Public methods2158.33%
▷ Protected methods1130.56%
▷ Private methods411.11%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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