90% blocks-for-eventbrite

Code Review | Blocks for Eventbrite

WordPress plugin Blocks for Eventbrite scored90%from 54 tests.

About plugin

  • Plugin page: blocks-for-eventb...
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-5.9.1
  • WordPress version: 6.3.1
  • First release: Apr 9, 2020
  • Latest release: Mar 9, 2022
  • Number of updates: 30
  • Update frequency: every 23.3 days
  • Top authors: jonwaldstein (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /9,385 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.23MB] [CPU: ▼11.10ms] Passed 4 tests

This is a short check of server-side resources used by Blocks for Eventbrite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.65 ▼6.30
Dashboard /wp-admin3.34 ▲0.0450.56 ▼5.27
Posts /wp-admin/edit.php3.39 ▲0.0452.55 ▲3.80
Add New Post /wp-admin/post-new.php4.83 ▼1.0557.51 ▼33.65
Media Library /wp-admin/upload.php3.26 ▲0.0435.69 ▲0.83

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Blocks for Eventbrite
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.75 ▼0.654.59 ▲2.7444.50 ▼0.79
Dashboard /wp-admin2,203 ▲155.79 ▼0.1099.36 ▼16.5238.95 ▼2.67
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0238.67 ▲2.3336.02 ▲2.59
Add New Post /wp-admin/post-new.php6,371 ▲4,85224.97 ▲1.53871.62 ▲188.6558.81 ▲5.79
Media Library /wp-admin/upload.php1,391 ▲34.16 ▼0.0396.52 ▼5.6841.03 ▼3.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: eventbrite, events, block

blocks-for-eventbrite/blocks-for-eventbrite.php Passed 13 tests

The main PHP script in "Blocks for Eventbrite" version 1.1.2 is automatically included on every request by WordPress
47 characters long description:
Gutenberg blocks that display eventbrite events

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
No dangerous file extensions were detected1,227 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1038681,052
PHP33579170
CSS2105

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods233.33%
▷ Protected methods466.67%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants5
▷ Global constants120.00%
▷ Class constants480.00%
▷ Public constants4100.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.09MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/screenshot-1.png89.08KB22.28KB▼ 74.99%