84% bp-searchable-activity

Code Review | BP Searchable Activity

WordPress plugin BP Searchable Activity scored84%from 54 tests.

About plugin

  • Plugin page: bp-searchable-act...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9
  • WordPress version: 6.3.1
  • First release: Nov 28, 2013
  • Latest release: Jun 22, 2018
  • Number of updates: 4
  • Update frequency: every 417.2 days
  • Top authors: sbrajesh (75%)anusharma (50%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,418 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.52ms] Passed 4 tests

An overview of server-side resources used by BP Searchable Activity
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.13 ▼1.47
Dashboard /wp-admin3.31 ▲0.0153.51 ▲3.72
Posts /wp-admin/edit.php3.36 ▲0.0149.64 ▼3.92
Add New Post /wp-admin/post-new.php5.91 ▲0.0397.80 ▼8.40
Media Library /wp-admin/upload.php3.24 ▲0.0145.28 ▲7.28

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by BP Searchable Activity
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲3513.25 ▼1.145.62 ▲3.5446.58 ▲0.76
Dashboard /wp-admin2,223 ▲234.86 ▼1.04117.90 ▲4.4843.75 ▲2.53
Posts /wp-admin/edit.php2,102 ▼12.02 ▼0.0339.36 ▲1.5437.19 ▲0.10
Add New Post /wp-admin/post-new.php1,545 ▼022.94 ▼0.08658.17 ▲9.8851.15 ▲5.61
Media Library /wp-admin/upload.php1,405 ▲84.21 ▼0.0098.77 ▼21.3845.96 ▼10.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bp-searchable-activity/bp-searchable-activity.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: search, activity, buddypress

bp-searchable-activity/bp-searchable-activity.php Passed 13 tests

The entry point to "BP Searchable Activity" version 1.0.2 is a PHP file that has certain tags in its header comment area
73 characters long description:
BuddyPress Searchable Activity allows users to search BuddyPress Activity

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin68 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1282344
JavaScript18924

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected