79% pronamic-events

Code Review | Pronamic Events

WordPress plugin Pronamic Events scored79%from 54 tests.

About plugin

  • Plugin page: pronamic-events
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 19, 2012
  • Latest release: Jul 29, 2020
  • Number of updates: 52
  • Update frequency: every 56.4 days
  • Top authors: pronamic (67.31%)remcotolsma (34.62%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /12,088 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.45MB] [CPU: ▲0.87ms] Passed 4 tests

Server-side resources used by Pronamic Events
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4043.86 ▲2.29
Dashboard /wp-admin3.80 ▲0.5054.03 ▼1.34
Posts /wp-admin/edit.php3.87 ▲0.5153.12 ▲1.95
Add New Post /wp-admin/post-new.php6.34 ▲0.46100.76 ▲2.46
Media Library /wp-admin/upload.php3.66 ▲0.4442.21 ▲0.57
Categories /wp-admin/edit-tags.php?taxonomy=pronamic_event_category&post_type=pronamic_event3.7841.38
Add New /wp-admin/post-new.php?post_type=pronamic_event3.9267.14
Settings /wp-admin/edit.php?post_type=pronamic_event&page=pronamic_events_settings3.6945.12
All Events /wp-admin/edit.php?post_type=pronamic_event3.7940.84
Statuses /wp-admin/edit-tags.php?taxonomy=pronamic_event_status&post_type=pronamic_event3.7937.08

Server storage [IO: ▲0.91MB] [DB: ▲0.08MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 183 new files
Database: no new tables, 8 new options
New WordPress options
pronamic_events_db_version
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_pronamic_events_widget
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Pronamic Events: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7214.34 ▼0.011.99 ▲0.3640.70 ▼0.40
Dashboard /wp-admin2,236 ▲595.66 ▼0.0093.81 ▲5.2642.41 ▲6.79
Posts /wp-admin/edit.php2,138 ▲381.98 ▼0.0140.20 ▲5.3735.22 ▼3.75
Add New Post /wp-admin/post-new.php1,560 ▲3122.97 ▼0.74597.00 ▼24.6260.73 ▲11.22
Media Library /wp-admin/upload.php1,444 ▲474.33 ▲0.1596.19 ▼6.0345.17 ▼1.61
Categories /wp-admin/edit-tags.php?taxonomy=pronamic_event_category&post_type=pronamic_event1,3122.1227.3231.36
Add New /wp-admin/post-new.php?post_type=pronamic_event3,3048.06193.3778.14
Settings /wp-admin/edit.php?post_type=pronamic_event&page=pronamic_events_settings9411.9029.8033.30
All Events /wp-admin/edit.php?post_type=pronamic_event1,2282.1735.2730.36
Statuses /wp-admin/edit-tags.php?taxonomy=pronamic_event_status&post_type=pronamic_event1,3182.1230.5429.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_pronamic_events_widget
    • pronamic_events_db_version
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/pronamic-events/vendor/sabre/vobject/bin/generateicalendardata.php
  • 201× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      simplexml_load_string(): ion-social-network-icon fusion-tooltip fusion-facebook awb-icon-facebook" style in wp-content/plugins/pronamic-events/vendor/sabre/vobject/bin/fetch_windows_zones.php on line 11
    • > PHP Warning
      simplexml_load_string(): /https?:\\/\\/(?:www\\.)?youtu(?:\\.be\\/([^\\?]+)\\??|be\\.com\\/watch\\?(.*(?=v=))v=([^& in wp-content/plugins/pronamic-events/vendor/sabre/vobject/bin/fetch_windows_zones.php on line 11
    • > PHP Warning
      simplexml_load_string(): Entity: line 673: parser error : Specification mandates value for attribute required in wp-content/plugins/pronamic-events/vendor/sabre/vobject/bin/fetch_windows_zones.php on line 11
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabre\\VObject\\Splitter\\SplitterInterface' not found in wp-content/plugins/pronamic-events/vendor/sabre/vobject/lib/Splitter/VCard.php:23
    • > PHP Warning
      simplexml_load_string(): Entity: line 865: parser error : Specification mandates value for attribute style in wp-content/plugins/pronamic-events/vendor/sabre/vobject/bin/fetch_windows_zones.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function flush_rewrite_rules() in wp-content/plugins/pronamic-events/admin/settings.php:5
    • > PHP Warning
      simplexml_load_string(): Entity: line 673: parser error : Couldn't find end of Start Tag input line 673 in wp-content/plugins/pronamic-events/vendor/sabre/vobject/bin/fetch_windows_zones.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'Sabre\\VObject\\Document' not found in wp-content/plugins/pronamic-events/vendor/sabre/vobject/lib/Component/VCard.php:18
    • > PHP Warning
      simplexml_load_string(): Entity: line 865: parser error : attributes construct error in wp-content/plugins/pronamic-events/vendor/sabre/vobject/bin/fetch_windows_zones.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'Sabre\\VObject\\Component' not found in wp-content/plugins/pronamic-events/vendor/sabre/vobject/lib/Component/Available.php:17

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: agenda, events, pronamic

pronamic-events/pronamic-events.php Passed 13 tests

The main PHP file in "Pronamic Events" ver. 1.3.0 adds more information about the plugin and also serves as the entry point for this plugin
60 characters long description:
This plugin add some basic Event functionality to WordPress.

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
Everything looks great! No dangerous files found in this plugin14,427 lines of code in 157 files:
LanguageFilesBlank linesComment linesLines of code
PHP1153,2966,1729,724
CSS27963262,697
PO File39981,937903
Markdown21880538
SQL82855377
JSON200188

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity16.65
▷ Minimum class complexity1.00
▷ Maximum class complexity139.00
Average method complexity4.09
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces12
Interfaces2
Traits0
Classes82
▷ Abstract classes44.88%
▷ Concrete classes7895.12%
▷ Final classes00.00%
Methods437
▷ Static methods235.26%
▷ Public methods37786.27%
▷ Protected methods4610.53%
▷ Private methods143.20%
Functions47
▷ Named functions2961.70%
▷ Anonymous functions1838.30%
Constants25
▷ Global constants00.00%
▷ Class constants25100.00%
▷ Public constants25100.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
19 compressed PNG files occupy 0.06MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/jquery-ui/themes/base/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%
assets/jquery-ui/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
assets/jquery-ui/themes/base/images/ui-icons_444444_256x240.png6.92KB4.18KB▼ 39.61%
assets/jquery-ui/themes/base/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
assets/jquery-ui/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%