74% widget-for-eventbrite-api

Code Review | Display Eventbrite Events

WordPress plugin Display Eventbrite Events scored74%from 54 tests.

About plugin

  • Plugin page: widget-for-eventb...
  • Plugin version: 5.4.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: Feb 17, 2017
  • Latest release: Nov 6, 2023
  • Number of updates: 202
  • Update frequency: every 12.2 days
  • Top authors: fullworks (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

3,000+ active /153,212 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.20MB] [CPU: ▲23.31ms] 75% from 4 tests

This is a short check of server-side resources used by Display Eventbrite Events
Please take the time to fix the following items
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.20MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.98 ▲5.5267.30 ▲24.88
Dashboard /wp-admin9.00 ▲5.6576.50 ▲12.91
Posts /wp-admin/edit.php9.01 ▲5.6480.79 ▲34.04
Add New Post /wp-admin/post-new.php9.88 ▲3.98117.30 ▲21.41
Media Library /wp-admin/upload.php9.00 ▲5.7768.71 ▲36.91
Display Eventbrite Events Settings /wp-admin/options-general.php?page=widget-for-eventbrite-api-settings9.0169.44
Display Eventbrite Setup Wizard /wp-admin/options-general.php?page=widget-for-eventbrite-api-setup-wizard9.0161.10
Settings /wp-admin/admin.php?page=widget-for-eventbrite-api9.0157.85
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.0158.27

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 323 new files
Database: no new tables, 12 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_eventbrite-events
fs_active_plugins
fs_accounts
widget_recent-comments
widget-for-eventbrite-api-version
can_compress_scripts
theysaidso_admin_options
fs_debug_mode
...

Browser metrics Passed 4 tests

A check of browser resources used by Display Eventbrite Events
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲15813.40 ▼0.887.38 ▲5.7828.46 ▼15.03
Dashboard /wp-admin2,227 ▲505.65 ▲0.10102.06 ▲2.1545.85 ▼0.83
Posts /wp-admin/edit.php2,136 ▲362.01 ▼0.0040.02 ▲2.7939.66 ▲6.64
Add New Post /wp-admin/post-new.php1,544 ▲421.92 ▼1.19671.24 ▼9.4052.69 ▲1.18
Media Library /wp-admin/upload.php1,432 ▲384.21 ▲0.0498.04 ▲1.5847.11 ▲3.50
Display Eventbrite Events Settings /wp-admin/options-general.php?page=widget-for-eventbrite-api-settings1,0792.0339.1262.61
Display Eventbrite Setup Wizard /wp-admin/options-general.php?page=widget-for-eventbrite-api-setup-wizard8922.0127.4627.40
Settings /wp-admin/admin.php?page=widget-for-eventbrite-api7872.0124.9219.23
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,1031.6627.5229.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/widget-for-eventbrite-api/includes/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_recent-comments
    • widget_eventbrite-events
    • fs_accounts
    • fs_debug_mode
    • can_compress_scripts
    • theysaidso_admin_options
    • fs_active_plugins
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 43× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined property: stdClass::$template_loader in wp-content/plugins/widget-for-eventbrite-api/templates__free/layout_widget.php on line 17
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/widget-for-eventbrite-api/templates__free/parts/booknow__free.php on line 9
    • > PHP Warning
      Creating default object from empty value in wp-content/plugins/widget-for-eventbrite-api/templates__free/layout_widget.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/widget-for-eventbrite-api/templates__free/parts/title_widget__free.php:11
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/widget-for-eventbrite-api/templates__free/parts/calendar_date__free.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_template_part() on null in wp-content/plugins/widget-for-eventbrite-api/templates__free/loops/loop_card.php:10
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_template_part() on null in wp-content/plugins/widget-for-eventbrite-api/templates__free/common_layout_card.php:14
    • > PHP Notice
      Trying to get property 'event' of non-object in wp-content/plugins/widget-for-eventbrite-api/templates__free/parts/booknow__free.php on line 6
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/widget-for-eventbrite-api/templates__free/common_layout_widget.php on line 14
    • > PHP Notice
      Trying to get property 'event' of non-object in wp-content/plugins/widget-for-eventbrite-api/templates__free/parts/title_widget__free.php on line 10

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: eventbrite shortcode, events, eventbrite widget, eventbrite, widget

widget-for-eventbrite-api/widget-for-eventbrite-api.php Passed 13 tests

This is the main PHP file of "Display Eventbrite Events" version 5.4.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
55 characters long description:
Easily display Eventbrite events on your WordPress site

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin47,803 lines of code in 239 files:
LanguageFilesBlank linesComment linesLines of code
PHP1568,69918,85237,029
Sass457221144,231
JavaScript99839793,993
CSS192341021,998
PO File1149172443
XML2275067
SVG70042

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity70.07
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes69
▷ Abstract classes22.90%
▷ Concrete classes6797.10%
▷ Final classes00.00%
Methods1,439
▷ Static methods20914.52%
▷ Public methods1,00069.49%
▷ Protected methods322.22%
▷ Private methods40728.28%
Functions124
▷ Named functions11189.52%
▷ Anonymous functions1310.48%
Constants152
▷ Global constants10367.76%
▷ Class constants4932.24%
▷ Public constants49100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
includes/vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%