84% bp-group-hierarchy-propagate

Code Review | BP Group Hierarchy Propagate

WordPress plugin BP Group Hierarchy Propagate scored84%from 54 tests.

About plugin

  • Plugin page: bp-group-hierarch...
  • Plugin version: 0.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5
  • WordPress version: 6.3.1
  • First release: May 4, 2013
  • Latest release: Apr 5, 2016
  • Number of updates: 15
  • Update frequency: every 71.7 days
  • Top authors: needle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,518 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by BP Group Hierarchy Propagate
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0346.17 ▲5.00
Dashboard /wp-admin3.33 ▲0.0345.51 ▼7.21
Posts /wp-admin/edit.php3.39 ▲0.0357.50 ▲9.00
Add New Post /wp-admin/post-new.php5.92 ▲0.0378.34 ▼11.26
Media Library /wp-admin/upload.php3.26 ▲0.0333.40 ▼0.81

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for BP Group Hierarchy Propagate
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.081.61 ▼0.2240.77 ▼2.09
Dashboard /wp-admin2,203 ▲155.79 ▲0.9098.94 ▼19.6339.42 ▼5.82
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0441.35 ▲1.4135.22 ▲2.27
Add New Post /wp-admin/post-new.php1,542 ▲2818.25 ▲0.71593.57 ▼148.7851.92 ▼5.73
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.0595.74 ▼7.6140.49 ▼4.20

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/bp-group-hierarchy-propagate/bp-group-hierarchy-propagate.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: activity, hierarchy, groups, buddypress, propagate

bp-group-hierarchy-propagate/bp-group-hierarchy-propagate.php Passed 13 tests

The principal PHP file in "BP Group Hierarchy Propagate" v. 0.3.3 is loaded by WordPress automatically on each request
127 characters long description:
Enables propagation of Activity Items up or down a hierarchy of BuddyPress Groups established by the BP Group Hierarchy plugin.

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
Everything looks great! No dangerous files found in this plugin155 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1151166155

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity5.12
▷ Minimum method complexity2.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin