78% bp-activity-plus-reloaded

Code Review | Activity Plus Reloaded for BuddyPress

WordPress plugin Activity Plus Reloaded for BuddyPress scored78%from 54 tests.

About plugin

  • Plugin page: bp-activity-plus-...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 27, 2019
  • Latest release: Aug 7, 2023
  • Number of updates: 14
  • Update frequency: every 94.9 days
  • Top authors: sbrajesh (71.43%)raviousprime (21.43%)buddydev (21.43%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /28,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.61ms] Passed 4 tests

Analyzing server-side resources used by Activity Plus Reloaded for BuddyPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.46 ▼0.69
Dashboard /wp-admin3.34 ▼0.0144.39 ▼18.19
Posts /wp-admin/edit.php3.45 ▲0.0948.98 ▲0.76
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.65 ▼12.33
Media Library /wp-admin/upload.php3.26 ▲0.0340.98 ▲2.06

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 46 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
bpfb_plugin
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Activity Plus Reloaded for BuddyPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.23 ▼0.321.71 ▼0.0340.97 ▲1.22
Dashboard /wp-admin2,195 ▲175.63 ▼0.0883.54 ▼25.9738.57 ▼4.98
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0335.99 ▲0.0234.22 ▼1.37
Add New Post /wp-admin/post-new.php1,526 ▼023.65 ▲0.43687.16 ▼6.2055.31 ▼5.29
Media Library /wp-admin/upload.php1,403 ▲64.19 ▲0.02101.96 ▼14.5945.59 ▼6.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • bpfb_plugin

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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 fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/bp-activity-plus-reloaded/lib/forms/images_tag_template.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_ssl() in wp-content/plugins/bp-activity-plus-reloaded/bp-activity-plus-reloaded.php:39
    • > PHP Notice
      Undefined variable: images in wp-content/plugins/bp-activity-plus-reloaded/lib/forms/images_tag_template.php on line 3
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/bp-activity-plus-reloaded/lib/forms/images_tag_template.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-activity-plus-reloaded/lib/class-bpapr-group-documents.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'BPAPR_Data' not found in wp-content/plugins/bp-activity-plus-reloaded/lib/forms/link_tag_template.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

bp-activity-plus-reloaded/bp-activity-plus-reloaded.php Passed 13 tests

The primary PHP file in "Activity Plus Reloaded for BuddyPress" version 1.1.0 is used by WordPress to initiate all plugin functionality
64 characters long description:
A Facebook-style media sharing improvement for the activity box.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin5,074 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP177331,0143,145
JavaScript32462531,413
CSS4347329
PO File15257135
SVG10052

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.50
Average class complexity39.31
▷ Minimum class complexity2.00
▷ Maximum class complexity249.00
Average method complexity4.39
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods181
▷ Static methods168.84%
▷ Public methods14278.45%
▷ Protected methods158.29%
▷ Private methods2413.26%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants33
▷ Global constants33100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/system/link.png4.96KB1.59KB▼ 67.88%
assets/img/system/theme-new.png4.32KB1.36KB▼ 68.56%
assets/img/system/theme-legacy.png7.76KB2.79KB▼ 64.00%
assets/img/system/film.png4.94KB1.70KB▼ 65.60%
assets/img/system/cancel.png1.78KB1.50KB▼ 16.06%