77% bp-extend-groups-fields

Code Review | BuddyPress Extend Fields

WordPress plugin BuddyPress Extend Fields scored77%from 54 tests.

About plugin

  • Plugin page: bp-extend-groups-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 19, 2017
  • Latest release: Jan 19, 2017
  • Number of updates: 8
  • Update frequency: every 0.5 days
  • Top authors: serggordienko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,607 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼8.12ms] Passed 4 tests

This is a short check of server-side resources used by BuddyPress Extend Fields
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1340.03 ▲0.72
Dashboard /wp-admin3.44 ▲0.0947.64 ▼12.89
Posts /wp-admin/edit.php3.56 ▲0.2047.87 ▼0.68
Add New Post /wp-admin/post-new.php6.02 ▲0.1392.19 ▼19.62
Media Library /wp-admin/upload.php3.36 ▲0.1340.42 ▲6.07

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
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

Checking browser requirements for BuddyPress Extend Fields
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.28 ▼1.144.40 ▲2.8037.62 ▼0.88
Dashboard /wp-admin2,203 ▲125.79 ▲0.8898.97 ▼12.8439.88 ▼8.99
Posts /wp-admin/edit.php2,089 ▲32.04 ▼0.0140.45 ▼0.6534.47 ▼4.56
Add New Post /wp-admin/post-new.php1,542 ▲2018.06 ▼5.24663.19 ▲59.2361.50 ▲7.28
Media Library /wp-admin/upload.php1,388 ▼04.27 ▲0.1498.30 ▲0.4545.84 ▲3.80

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/bp-extend-groups-fields/templates/view.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_groups_has_multiple_field_groups() in wp-content/plugins/bp-extend-groups-fields/templates/groups/single/admin/other-fields.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bp-extend-groups-fields/templates/form.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_has_groups() in wp-content/plugins/bp-extend-groups-fields/templates/home.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function selected() in wp-content/plugins/bp-extend-groups-fields/templates/types.php:7
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/bp-extend-groups-fields/templates/types.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bp-extend-groups-fields/bp-fields.php:874

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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 your attention:
  • Tested up to: Version not formatted correctly
  • Requires at least: Version not formatted correctly
  • Screenshots: Please add an image for screenshot #3 (`screenshots/screenshot-3.png`)
The official readme.txt is a good inspiration

bp-extend-groups-fields/bp-fields.php 92% from 13 tests

"BuddyPress Extend Fields" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bp-extend-groups-fields.php" instead of "bp-fields.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,302 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP740296956
CSS2102186
JavaScript1520130
Markdown112030

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity131.00
▷ Minimum class complexity131.00
▷ Maximum class complexity131.00
Average method complexity4.51
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods37
▷ Static methods1335.14%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.76MB with 0.58MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/screensot-3.png240.45KB58.63KB▼ 75.62%
screenshots/screenshot.png246.64KB57.45KB▼ 76.71%
screenshots/screenshot-2.png293.27KB75.48KB▼ 74.26%