10% tribe-events-oembed

Code Review | The Events Calendar: oEmbed

WordPress plugin The Events Calendar: oEmbed scored10%from 54 tests.

About plugin

  • Plugin page: tribe-events-oembed
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.8
  • WordPress version: 6.3.1
  • First release: Feb 7, 2014
  • Latest release: Feb 7, 2014
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: codearachnid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,127 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/tribe-events-oembed/tribe-events-oembed.php+413
    Uncaught Error: Class 'TribeEvents' not found in wp-content/plugins/tribe-events-oembed/tribe-events-oembed.php:413
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): tribe_events_oembed_flush_rewrites()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.99ms] Passed 4 tests

Analyzing server-side resources used by The Events Calendar: oEmbed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.85 ▲6.14
Dashboard /wp-admin3.31 ▲0.0050.41 ▼0.45
Posts /wp-admin/edit.php3.36 ▲0.0046.31 ▼5.73
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.04 ▼7.47
Media Library /wp-admin/upload.php3.23 ▲0.0034.20 ▲1.70

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for The Events Calendar: oEmbed
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.164.62 ▲2.9543.90 ▼3.86
Dashboard /wp-admin2,209 ▲214.84 ▼1.04111.98 ▲6.8443.48 ▲3.10
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0233.73 ▼10.9236.63 ▲1.74
Add New Post /wp-admin/post-new.php1,533 ▲1323.21 ▲0.09665.12 ▲44.3271.02 ▲22.47
Media Library /wp-admin/upload.php1,388 ▲64.15 ▼0.0396.24 ▲1.0742.94 ▼0.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% 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 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 fix the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/tribe-events-oembed/template-tags.php
    • > /wp-content/plugins/tribe-events-oembed/tribe-events-oembed.php
    • > /wp-content/plugins/tribe-events-oembed/views/oembed.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP' not found in wp-content/plugins/tribe-events-oembed/lib/tribe_ombed_service.php:10

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 90% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #0 is required in tribe-events-oembed/assets to your readme.txt
  • Screenshots: Screenshot #1 (Sample embedded display) image missing
The official readme.txt is a good inspiration

tribe-events-oembed/tribe-events-oembed.php 92% from 13 tests

"The Events Calendar: oEmbed" version 0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Good job! No executable or dangerous file extensions detected702 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP7162304571
JavaScript237131

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity26.25
▷ Minimum class complexity18.00
▷ Maximum class complexity46.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods28
▷ Static methods1657.14%
▷ Public methods2278.57%
▷ Protected methods00.00%
▷ Private methods621.43%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot.png33.17KB8.64KB▼ 73.94%