83% buddypress-hovercards

Code Review | BuddyPress Hovercards

WordPress plugin BuddyPress Hovercards scored 83% from 54 tests.

About plugin

  • Plugin page: buddypress-hoverc...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 26, 2012
  • Latest release: Jan 24, 2013
  • Number of updates: 14
  • Update frequency: every 21.1 days
  • Top authors: Mike_Cowobo (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 6,178 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
The plugin installed gracefully, with no errors

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

Server-side resources used by BuddyPress Hovercards
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.64 ▼9.60
Dashboard /wp-admin3.31 ▲0.0144.31 ▼4.91
Posts /wp-admin/edit.php3.36 ▲0.0046.43 ▼1.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.83 ▲0.94
Media Library /wp-admin/upload.php3.23 ▲0.0032.49 ▼2.15

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

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

Browser metrics Passed 4 tests

A check of browser resources used by BuddyPress Hovercards
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.084.40 ▲2.6040.47 ▼5.85
Dashboard /wp-admin2,200 ▲285.79 ▼0.07105.04 ▼7.9338.10 ▼7.77
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0139.65 ▼0.1135.59 ▲3.87
Add New Post /wp-admin/post-new.php1,534 ▼823.15 ▲5.15615.55 ▲9.0549.52 ▲0.78
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.0296.79 ▲2.1241.51 ▼0.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_has_members() in wp-content/plugins/buddypress-hovercards/templates/hovercard.php:1

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)
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (Example hovercard using the template included in the plugin.)
  • Requires at least: Invalid version format
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === buddypress-hovercards === )
  • Tested up to: Invalid version format
You can take inspiration from this readme.txt

buddypress-hovercards/bp-hovercards.php 92% from 13 tests

The main file in "BuddyPress Hovercards" v. 1.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("buddypress-hovercards.php" instead of "bp-hovercards.php")

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
Everything looks great! No dangerous files found in this plugin449 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript25639305
PHP2348187
CSS29436
PO File13221

PHP code Passed 2 tests

Analyzing 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.25
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods583.33%
▷ Protected methods116.67%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/_inc/images/45pc_black.png0.12KB0.09KB▼ 21.14%
screenshot-1.png75.43KB23.40KB▼ 68.98%