83% activity-link-preview-for-buddypress

Code Review | Wbcom Designs - Activity Link Preview For BuddyPress

WordPress plugin Wbcom Designs - Activity Link Preview For BuddyPress scored83%from 54 tests.

About plugin

  • Plugin page: activity-link-pre...
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9.3
  • WordPress version: 6.3.1
  • First release: Mar 31, 2021
  • Latest release: Apr 20, 2022
  • Number of updates: 8
  • Update frequency: every 48.6 days
  • Top authors: vapvarun (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /4,353 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
Installer ran successfully

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

This is a short check of server-side resources used by Wbcom Designs - Activity Link Preview For BuddyPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.73 ▼3.52
Dashboard /wp-admin3.31 ▲0.0045.87 ▼4.29
Posts /wp-admin/edit.php3.36 ▲0.0046.77 ▼2.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.27 ▼12.49
Media Library /wp-admin/upload.php3.23 ▲0.0033.67 ▲0.69

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Wbcom Designs - Activity Link Preview For BuddyPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.364.66 ▲2.7842.69 ▼5.51
Dashboard /wp-admin2,209 ▲214.85 ▼0.97102.06 ▼10.8539.51 ▼2.84
Posts /wp-admin/edit.php2,092 ▲32.13 ▲0.1340.51 ▲4.5836.05 ▲1.43
Add New Post /wp-admin/post-new.php1,533 ▲1923.39 ▲5.87686.54 ▼21.1458.51 ▲3.12
Media Library /wp-admin/upload.php1,388 ▲64.23 ▼0.0697.77 ▼12.8643.27 ▼2.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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 shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/activity-link-preview-for-buddypress/bp-activity-link-preview.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Screenshot #1 (screenshot-1) image not found
You can look at the official readme.txt

activity-link-preview-for-buddypress/bp-activity-link-preview.php 77% from 13 tests

This is the main PHP file of "Wbcom Designs - Activity Link Preview For BuddyPress" version 1.4.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("activity-link-preview-for-buddypress.php" instead of "bp-activity-link-preview.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin558 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1542219
PHP15378201
CSS13111138

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Constants2
▷ Global constants2100.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
1 compressed PNG file occupies 0.10MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png102.03KB101.21KB▼ 0.81%