78% buddypress-global-search

Code Review | BuddyPress Global Search

WordPress plugin BuddyPress Global Search scored78%from 54 tests.

About plugin

  • Plugin page: buddypress-global...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.2.2
  • WordPress version: 6.3.1
  • First release: Jan 12, 2015
  • Latest release: Jul 31, 2019
  • Number of updates: 57
  • Update frequency: every 29.9 days
  • Top authors: BuddyBoss (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

4,000+ active /163,929 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.38MB] [CPU: ▼0.44ms] Passed 4 tests

This is a short check of server-side resources used by BuddyPress Global Search
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3938.89 ▼2.38
Dashboard /wp-admin3.73 ▲0.4244.84 ▼0.16
Posts /wp-admin/edit.php3.78 ▲0.4249.87 ▲3.60
Add New Post /wp-admin/post-new.php6.24 ▲0.3683.93 ▼2.80
Media Library /wp-admin/upload.php3.58 ▲0.3639.18 ▲5.42
Global Search /wp-admin/admin.php?page=buddyboss-globalsearch3.5533.28

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for BuddyPress Global Search
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,095 ▲36014.10 ▼0.6717.07 ▲15.3339.59 ▼8.95
Dashboard /wp-admin2,238 ▲505.83 ▲0.94105.32 ▼7.2077.22 ▲33.66
Posts /wp-admin/edit.php2,124 ▲322.01 ▲0.0237.99 ▼6.8134.52 ▼4.85
Add New Post /wp-admin/post-new.php1,549 ▲2118.02 ▼0.25681.01 ▲70.5161.13 ▲6.98
Media Library /wp-admin/upload.php1,420 ▲354.18 ▼0.0098.67 ▼0.3873.58 ▲28.14
Global Search /wp-admin/admin.php?page=buddyboss-globalsearch9152.1925.9428.59

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% 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 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/buddypress-global-search/templates/loop/awpcp_ad_listing-ajax.php
  • 28× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/buddypress-global-search/templates/loop/member-ajax.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/buddypress-global-search/includes/help-support.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function comment_author_link() in wp-content/plugins/buddypress-global-search/templates/loop/comment-ajax.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_group_permalink() in wp-content/plugins/buddypress-global-search/templates/loop/group.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/buddypress-global-search/templates/loop/post-ajax.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/buddypress-global-search/templates/loop/post.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_member_permalink() in wp-content/plugins/buddypress-global-search/templates/loop/member.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bbp_topic_permalink() in wp-content/plugins/buddypress-global-search/templates/loop/topic.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function buddyboss_global_search_load_template() in wp-content/plugins/buddypress-global-search/templates/results-page.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/buddypress-global-search/templates/loop/activity-comment-ajax.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
Please take inspiration from this readme.txt

buddypress-global-search/buddypress-global-search.php Passed 13 tests

"BuddyPress Global Search" version 1.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
37 characters long description:
Ajax powered global BuddyPress search

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin6,883 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
PHP561,0171,5743,121
JSON2001,486
PO File84806791,259
JavaScript6137122754
CSS31817248
SVG10115

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity15.85
▷ Minimum class complexity2.00
▷ Maximum class complexity92.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes210.00%
▷ Concrete classes1890.00%
▷ Final classes00.00%
Methods121
▷ Static methods1411.57%
▷ Public methods9074.38%
▷ Protected methods119.09%
▷ Private methods2016.53%
Functions30
▷ Named functions2893.33%
▷ Anonymous functions26.67%
Constants5
▷ Global constants5100.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
14 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
assets/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%
assets/css/images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%
assets/css/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
assets/css/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%