83% bp-profile-shortcodes-extra

Code Review | BP Profile Shortcodes Extra

WordPress plugin BP Profile Shortcodes Extra scored83%from 54 tests.

About plugin

  • Plugin page: bp-profile-shortc...
  • Plugin version: 2.5.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 8, 2018
  • Latest release: May 13, 2019
  • Number of updates: 183
  • Update frequency: every 2.2 days
  • Top authors: Venutius (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /22,087 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.88ms] Passed 4 tests

An overview of server-side resources used by BP Profile Shortcodes Extra
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0436.27 ▼2.82
Dashboard /wp-admin3.34 ▲0.0447.57 ▲0.10
Posts /wp-admin/edit.php3.39 ▲0.0345.22 ▼8.86
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.90 ▼23.93
Media Library /wp-admin/upload.php3.26 ▲0.0337.95 ▲3.65

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 71 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for BP Profile Shortcodes Extra
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7114.44 ▲0.081.63 ▼0.1341.73 ▼7.26
Dashboard /wp-admin2,215 ▲275.01 ▲0.08101.22 ▲0.2839.67 ▼2.69
Posts /wp-admin/edit.php2,095 ▲62.02 ▲0.0133.28 ▼9.3733.91 ▼2.96
Add New Post /wp-admin/post-new.php6,358 ▲4,82428.39 ▲5.25929.86 ▲308.3940.28 ▼9.26
Media Library /wp-admin/upload.php1,394 ▲64.26 ▲0.0394.81 ▼5.9340.76 ▼0.94

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_activity_post_form_action() in wp-content/plugins/bp-profile-shortcodes-extra/templates/legacy/activity/post-form.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/bp-profile-shortcodes-extra/lib/class-wp-rest-shortcodes-controller-bpps.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_activity_post_form_action() in wp-content/plugins/bp-profile-shortcodes-extra/templates/nouveau/activity/post-form.php:12

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, but this is not an exhaustive test

Optimizations

Plugin configuration 86% 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
Attributes that require attention:
  • Donate link: Invalid URI ("paypal.me/GeorgeChaplin")
Please take inspiration from this readme.txt

bp-profile-shortcodes-extra/loader.php 77% from 13 tests

"BP Profile Shortcodes Extra" version 2.5.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bp-profile-shortcodes-extra.php" instead of "loader.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin13,095 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
JSON2007,242
JavaScript261,2111,0915,296
PHP786143351
PO File16194158
CSS12026
Markdown16019
Bourne Shell1203

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 123)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity125.67
▷ Minimum class complexity4.00
▷ Maximum class complexity364.00
Average method complexity8.48
▷ Minimum method complexity1.00
▷ Maximum method complexity123.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods50
▷ Static methods12.00%
▷ Public methods50100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/bppsc.png2.36KB0.72KB▼ 69.42%