89% buddyforms-attach-posts-to-groups-extension

Code Review | BuddyForms Attach Post with Group

WordPress plugin BuddyForms Attach Post with Group scored 89% from 54 tests.

About plugin

  • Plugin page: buddyforms-attach...
  • Plugin version: 1.2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.9
  • WordPress version: 5.8.1
  • First release: May 12, 2014
  • Latest release: Feb 23, 2022
  • Number of updates: 223
  • Update frequency: every 12.8 days
  • Top authors: svenl77 (99.1%)gfirem (1.35%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active / 7,731 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.56MB] [CPU: ▼178.12ms] Passed 4 tests

This is a short check of server-side resources used by BuddyForms Attach Post with Group
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.11 ▲0.2825.55 ▲2.25
Dashboard /wp-admin3.72 ▲0.6636.68 ▼0.09
Posts /wp-admin/edit.php3.77 ▲0.6742.28 ▲12.31
Add New Post /wp-admin/post-new.php6.09 ▲0.6571.77 ▼719.68
Media Library /wp-admin/upload.php3.67 ▲0.6727.77 ▲5.03
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.6723.51

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 66 new files
Database: no new tables, 3 new options
New WordPress options
widget_buddyforms_all_posts_of_this_group_widget
widget_buddyforms_apwg_taxonomy_term_post_widget
widget_buddyforms_list_moderators_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for BuddyForms Attach Post with Group
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,707 ▲10615.73 ▼0.235.07 ▼0.1974.13 ▼1.19
Dashboard /wp-admin2,971 ▲726.14 ▼0.01117.09 ▼13.47181.16 ▲6.54
Posts /wp-admin/edit.php2,793 ▲533.24 ▼0.1068.45 ▲2.68152.12 ▲9.51
Add New Post /wp-admin/post-new.php3,834 ▲9916.99 ▼1.65437.99 ▼8.67164.38 ▼0.57
Media Library /wp-admin/upload.php1,803 ▲515.56 ▲0.06144.45 ▲7.39199.73 ▲14.14
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,3372.4454.67124.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 3 options
    • widget_buddyforms_list_moderators_widget
    • widget_buddyforms_all_posts_of_this_group_widget
    • widget_buddyforms_apwg_taxonomy_term_post_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #5 (**Overview FormBuilder** - This is a Screenshot of the Form builder with BuddyForms Attached Groups enabled.)
  • Screenshots: A description for screenshot #6 is missing in buddyforms-attach-posts-to-groups-extension/assets to your readme.txt
You can take inspiration from this readme.txt

buddyforms-attach-posts-to-groups-extension/loader.php 85% from 13 tests

The entry point to "BuddyForms Attach Post with Group" version 1.2.9 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("buddyforms-attach-posts-to-groups-extension.php" instead of "loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin6,756 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PO File201,5422,0985,128
PHP114793651,572
JSON10034
CSS14022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity38.62
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.51
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods136
▷ Static methods64.41%
▷ Public methods11383.09%
▷ Protected methods2316.91%
▷ Private methods00.00%
Functions38
▷ Named functions2976.32%
▷ Anonymous functions923.68%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants3100.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
PNG images were not found in this plugin