84% bp-user-widgets

Code Review | BP User Widgets

WordPress plugin BP User Widgets scored 84% from 54 tests.

About plugin

  • Plugin page: bp-user-widgets
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 16, 2019
  • Latest release: Jan 14, 2021
  • Number of updates: 22
  • Update frequency: every 34.0 days
  • Top authors: Venutius (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 2,641 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
This plugin's installer ran successfully

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

A check of server-side resources used by BP User Widgets
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.80 ▼0.13
Dashboard /wp-admin3.33 ▲0.0244.47 ▼0.13
Posts /wp-admin/edit.php3.38 ▲0.0246.60 ▼1.17
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.42 ▼10.94
Media Library /wp-admin/upload.php3.25 ▲0.0237.27 ▲2.06

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_bp_user_widgets
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

BP User Widgets: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲16513.85 ▼0.448.88 ▲6.4742.76 ▼3.47
Dashboard /wp-admin2,203 ▲155.77 ▲0.90107.56 ▼4.0639.72 ▲2.14
Posts /wp-admin/edit.php2,092 ▼02.01 ▼0.0438.92 ▼4.2335.20 ▲0.72
Add New Post /wp-admin/post-new.php1,536 ▲823.12 ▼0.29587.57 ▼113.4954.92 ▼4.14
Media Library /wp-admin/upload.php1,388 ▼34.24 ▼0.0494.24 ▼5.0941.21 ▲0.63

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
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_bp_user_widgets
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/bp-user-widgets/includes/bpuw-widget-class.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: ""
The official readme.txt might help

bp-user-widgets/bp-user-widgets.php 92% from 13 tests

"BP User Widgets" version 1.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 233 characters long)

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
No dangerous file extensions were detected2,984 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS346531,232
PHP53821321,047
JavaScript18933522
PO File17276183

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity85.00
▷ Minimum class complexity85.00
▷ Maximum class complexity85.00
Average method complexity22.00
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/jquery/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
vendor/jquery/images/ui-icons_777777_256x240.png6.85KB4.18KB▼ 38.94%
vendor/jquery/images/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%
vendor/jquery/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
vendor/jquery/images/ui-icons_444444_256x240.png6.84KB4.18KB▼ 38.90%