83% buddypress-activity-anywhere

Code Review | Buddypress Activity Anywhere

WordPress plugin Buddypress Activity Anywhere scored83%from 54 tests.

About plugin

  • Plugin page: buddypress-activi...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 11, 2013
  • Latest release: Apr 12, 2014
  • Number of updates: 28
  • Update frequency: every 15.2 days
  • Top authors: ninjew (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,509 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

An overview of server-side resources used by Buddypress Activity Anywhere
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.48 ▲1.97
Dashboard /wp-admin3.31 ▲0.0047.38 ▼5.37
Posts /wp-admin/edit.php3.36 ▲0.0046.32 ▲1.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.50 ▼11.64
Media Library /wp-admin/upload.php3.23 ▲0.0035.33 ▲2.16

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

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

Browser metrics Passed 4 tests

Buddypress Activity Anywhere: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.411.71 ▲0.0242.87 ▲1.07
Dashboard /wp-admin2,203 ▲155.83 ▲0.8096.60 ▼8.7037.26 ▼9.68
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0033.92 ▼4.0832.09 ▲0.39
Add New Post /wp-admin/post-new.php1,533 ▲1423.13 ▼0.18681.17 ▲23.2953.79 ▲0.91
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.0298.85 ▼3.6443.12 ▲0.59

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/buddypress-activity-anywhere/form-templates/default/form.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-activity-anywhere/bp-activity-anywhere.php:149

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: You can take inspiration from this readme.txt

buddypress-activity-anywhere/bp-activity-anywhere.php 85% from 13 tests

Analyzing the main PHP file in "Buddypress Activity Anywhere" version 1.1
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("buddypress-activity-anywhere.php" instead of "bp-activity-anywhere.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin549 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP37790225
CSS1191152
PO File13939135
JavaScript16637

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
buttons/bpqa-button-purple.png3.21KB0.49KB▼ 84.64%
buttons/bpqa-button-red.png3.20KB0.49KB▼ 84.71%
buttons/bpqa-button-light-blue.png3.20KB0.51KB▼ 84.15%
buttons/bpqa-button-green.png3.21KB0.50KB▼ 84.53%