68% bp-events-calendar

Code Review | BP Events Calendar

WordPress plugin BP Events Calendar scored68%from 54 tests.

About plugin

  • Plugin page: bp-events-calendar
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 10, 2018
  • Latest release: Apr 10, 2018
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: wpdrift (75%)shamimmoeen (50%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,613 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.96ms] Passed 4 tests

Server-side resources used by BP Events Calendar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.49 ▲0.47
Dashboard /wp-admin3.32 ▲0.0154.48 ▼2.39
Posts /wp-admin/edit.php3.37 ▲0.0152.44 ▼4.21
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.92 ▼18.32
Media Library /wp-admin/upload.php3.24 ▲0.0135.84 ▼6.91

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 31 new files
Database: 2 new tables, 6 new options
New tables
wp_bpec_events_members
wp_bpec_groups_events
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

BP Events Calendar: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.26 ▼1.491.75 ▼0.0742.35 ▼5.31
Dashboard /wp-admin2,216 ▲374.84 ▼0.04112.30 ▼14.8942.39 ▼10.67
Posts /wp-admin/edit.php2,101 ▲92.02 ▲0.0038.44 ▼6.9232.68 ▼6.19
Add New Post /wp-admin/post-new.php1,529 ▼922.99 ▲1.80643.16 ▼81.7953.85 ▼1.83
Media Library /wp-admin/upload.php1,398 ▲104.23 ▲0.00101.78 ▼16.6944.42 ▼6.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_bpec_events_members
    • wp_bpec_groups_events
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/bp-events-calendar/templates/bpec-event-orders.php
    • > /wp-content/plugins/bp-events-calendar/templates/bpec-event-attendees.php
    • > /wp-content/plugins/bp-events-calendar/templates/bpec-event-form.php
    • > /wp-content/plugins/bp-events-calendar/templates/bpec-event-list.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_is_active() in wp-content/plugins/bp-events-calendar/includes/bpec-groups-extension.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bp_has_members() in wp-content/plugins/bp-events-calendar/templates/bpec-event-guests.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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: events, events-calendar, community-events, calendar, buddypress

bp-events-calendar/bp-events-calendar.php 92% from 13 tests

"BP Events Calendar" version 1.0.0'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:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "4.4")

Code Analysis Passed 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 plugin4,322 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP159091,0903,281
CSS27122814
JavaScript54543168
Markdown125042
JSON10017

PHP code Passed 2 tests

An short overview of 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.36
Average class complexity28.80
▷ Minimum class complexity3.00
▷ Maximum class complexity53.00
Average method complexity4.09
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods45
▷ Static methods1022.22%
▷ Public methods3986.67%
▷ Protected methods613.33%
▷ Private methods00.00%
Functions78
▷ Named functions78100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/placeholder.png2.75KB2.92KB0.00%
assets/images/publish.png0.63KB0.58KB▼ 7.47%
assets/images/draft.png0.40KB0.38KB▼ 3.69%
assets/images/pending.png0.81KB0.80KB▼ 1.93%