74% bp-force-profile

Code Review | Bp Force Profile

WordPress plugin Bp Force Profile scored74%from 54 tests.

About plugin

  • Plugin page: bp-force-profile
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.51
  • WordPress version: 6.3.1
  • First release: Dec 8, 2012
  • Latest release: Sep 1, 2013
  • Number of updates: 11
  • Update frequency: every 24.3 days
  • Top authors: rc183 (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

10+ active /7,295 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼1.04MB] [CPU: ▼36.70ms] Passed 4 tests

This is a short check of server-side resources used by Bp Force Profile
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▼0.6217.95 ▼21.61
Dashboard /wp-admin2.99 ▼0.3123.72 ▼22.74
Posts /wp-admin/edit.php3.00 ▼0.3622.89 ▼27.31
Add New Post /wp-admin/post-new.php2.99 ▼2.8923.86 ▼75.12
Media Library /wp-admin/upload.php3.00 ▼0.2321.27 ▼14.74

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

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

Browser metrics Passed 4 tests

Bp Force Profile: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,456 ▼27913.20 ▼0.970.53 ▼1.3817.56 ▼27.96
Dashboard /wp-admin2,206 ▲215.83 ▲0.95107.68 ▼3.5537.82 ▼6.46
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0140.13 ▲2.4033.05 ▼0.49
Add New Post /wp-admin/post-new.php1,537 ▲423.28 ▲0.08663.43 ▼5.0764.10 ▲10.81
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0095.05 ▼11.9642.99 ▼1.37

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/bp-force-profile/bp-fp-loader.php+47
    Trying to get property 'loggedin_user' of non-object
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • 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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/bp-force-profile/bp-fp-loader.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-force-profile/bp-fp-loader.php:145
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/bp-force-profile/bp-fp-loader.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-force-profile/bp-fp-admin.php:2

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (The front end), #2 (The admin setup page)
The official readme.txt is a good inspiration

bp-force-profile/bp-fp-loader.php 92% from 13 tests

The main PHP script in "Bp Force Profile" version 1.1.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bp-force-profile.php" instead of "bp-fp-loader.php")

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 plugin513 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PO File45660264
PHP23532168
CSS113081

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
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
2 PNG files occupy 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png63.33KB21.88KB▼ 65.44%
screenshot-1.png70.70KB20.56KB▼ 70.93%