84% buddypress-simple-events

Code Review | BuddyPress Simple Events

WordPress plugin BuddyPress Simple Events scored84%from 54 tests.

About plugin

  • Plugin page: buddypress-simple...
  • Plugin version: 6.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 23, 2015
  • Latest release: Apr 30, 2023
  • Number of updates: 124
  • Update frequency: every 23.9 days
  • Top authors: shanebp (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

300+ active /21,298 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.95ms] Passed 4 tests

Server-side resources used by BuddyPress Simple Events
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.37 ▼2.31
Dashboard /wp-admin3.36 ▲0.0249.37 ▼12.48
Posts /wp-admin/edit.php3.41 ▲0.0647.76 ▼0.83
Add New Post /wp-admin/post-new.php5.94 ▲0.0693.63 ▼8.02
Media Library /wp-admin/upload.php3.28 ▲0.0536.82 ▼1.00

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for BuddyPress Simple Events
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.31 ▼1.241.71 ▲0.1038.68 ▼5.81
Dashboard /wp-admin2,215 ▲305.83 ▼0.0394.54 ▼3.1841.68 ▲2.68
Posts /wp-admin/edit.php2,100 ▲111.97 ▼0.0840.98 ▲1.2137.22 ▼0.61
Add New Post /wp-admin/post-new.php1,523 ▲417.79 ▼5.47678.91 ▲31.6064.99 ▲12.60
Media Library /wp-admin/upload.php1,400 ▲94.19 ▼0.0397.38 ▼2.5444.52 ▼1.51

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_displayed_user_id() in wp-content/plugins/buddypress-simple-events/templates/members/single/profile-events-archive.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/buddypress-simple-events/templates/events-loop.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/buddypress-simple-events/templates/events-single.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PP_Simple_Events_Create' not found in wp-content/plugins/buddypress-simple-events/templates/members/single/profile-events-create.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_displayed_user_id() in wp-content/plugins/buddypress-simple-events/templates/members/single/profile-events-loop.php:13

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: events, buddypress, buddyboss, event

buddypress-simple-events/loader.php 85% from 13 tests

The primary PHP file in "BuddyPress Simple Events" version 6.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("buddypress-simple-events.php" instead of "loader.php")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,823 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP158501291,741
CSS110057
JavaScript39325

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity35.00
▷ Minimum class complexity3.00
▷ Maximum class complexity72.00
Average method complexity4.27
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods52
▷ Static methods11.92%
▷ Public methods3873.08%
▷ Protected methods00.00%
▷ Private methods1426.92%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected