84% bp-show-activity-liked-avatars

Code Review | BP Favorite Plus

WordPress plugin BP Favorite Plus scored84%from 54 tests.

About plugin

  • Plugin page: bp-show-activity-...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Sep 2, 2014
  • Latest release: May 27, 2020
  • Number of updates: 48
  • Update frequency: every 43.6 days
  • Top authors: mahdiar (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10+ active /3,826 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.65ms] Passed 4 tests

Server-side resources used by BP Favorite Plus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0337.70 ▼5.77
Dashboard /wp-admin3.38 ▲0.0343.80 ▼10.95
Posts /wp-admin/edit.php3.49 ▲0.0946.80 ▼4.28
Add New Post /wp-admin/post-new.php5.96 ▲0.0390.42 ▼9.60
Media Library /wp-admin/upload.php3.30 ▲0.0339.71 ▼1.75
BSALA Settings /wp-admin/options-general.php?page=bsala_settings3.2829.39

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

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

Browser metrics Passed 4 tests

A check of browser resources used by BP Favorite Plus
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲15213.57 ▼0.997.91 ▲6.2339.61 ▼3.54
Dashboard /wp-admin2,211 ▲375.62 ▲0.0696.05 ▲0.5044.23 ▲2.56
Posts /wp-admin/edit.php2,116 ▲161.98 ▲0.0134.25 ▼3.4733.20 ▼2.15
Add New Post /wp-admin/post-new.php1,541 ▲13721.54 ▲3.26687.17 ▲1.5761.78 ▲17.04
Media Library /wp-admin/upload.php1,410 ▲104.21 ▲0.00101.91 ▼6.8744.02 ▼4.88
BSALA Settings /wp-admin/options-general.php?page=bsala_settings9522.1327.8927.16

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
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 no errors were found, this is by no means 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
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bp-show-activity-liked-avatars/bp-show-activity-liked-avatar.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-show-activity-liked-avatars/admin-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bp-show-activity-liked-avatars/html-admin-settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: buddypress, favorite, bp favorite plus, paaz, like...

bp-show-activity-liked-avatars/bp-show-activity-liked-avatar.php 92% from 13 tests

This is the main PHP file of "BP Favorite Plus" version 2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bp-show-activity-liked-avatars.php" instead of "bp-show-activity-liked-avatar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin233 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3169219
CSS1009
JavaScript1105

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/help.png7.96KB3.60KB▼ 54.75%