84% buddypress-featured-members

Code Review | BuddyPress Featured Member

WordPress plugin BuddyPress Featured Member scored84%from 54 tests.

About plugin

  • Plugin page: buddypress-featur...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: May 2, 2013
  • Latest release: May 2, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: Rimon_Habib (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /5,694 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by BuddyPress Featured Member
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.67 ▼0.07
Dashboard /wp-admin3.32 ▼0.0348.01 ▼16.75
Posts /wp-admin/edit.php3.37 ▲0.0144.63 ▼5.92
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.22 ▼20.00
Media Library /wp-admin/upload.php3.24 ▲0.0133.43 ▲0.82

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by BuddyPress Featured Member
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲4614.44 ▲0.061.82 ▲0.0143.42 ▲6.21
Dashboard /wp-admin2,223 ▲374.83 ▼0.13113.09 ▲1.5546.24 ▲1.14
Posts /wp-admin/edit.php2,106 ▲172.03 ▼0.0235.88 ▼7.2439.64 ▲4.64
Add New Post /wp-admin/post-new.php1,531 ▲1717.63 ▲0.14680.91 ▼20.5667.36 ▲15.80
Media Library /wp-admin/upload.php1,408 ▲204.20 ▼0.0798.81 ▼11.7044.41 ▼5.54

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
The following issues need your attention
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/buddypress-featured-members/include/bfm-functions.php:85
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-featured-members/include/admin/admin-functions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/buddypress-featured-members/bp-featured-member.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-featured-members/include/bfm-hooks.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/buddypress-featured-members/include/bfm-ajax.php:17

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Go to user profile to make featured.), #2 (Featured members slider view.), #3 (Featured member shortcode generator)
The official readme.txt is a good inspiration

buddypress-featured-members/bp-featured-member.php 92% from 13 tests

The main file in "BuddyPress Featured Member" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("buddypress-featured-members.php" instead of "bp-featured-member.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin839 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS3343368
PHP65436367
JavaScript3613104

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
6 PNG files occupy 0.18MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/images/donate-coffe.png0.67KB0.38KB▼ 43.75%
screenshot-1.png67.10KB26.60KB▼ 60.36%
screenshot-2.png41.15KB19.73KB▼ 52.04%
lib/images/bfm_sprites.png10.55KB5.64KB▼ 46.56%
screenshot-3.png63.80KB23.58KB▼ 63.04%