84% openagenda

Code Review | OpenAgenda

WordPress plugin OpenAgenda scored84%from 54 tests.

About plugin

  • Plugin page: openagenda
  • Plugin version: 2.8.0
  • PHP compatiblity: 7.4.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 10, 2021
  • Latest release: Nov 15, 2023
  • Number of updates: 28
  • Update frequency: every 36.8 days
  • Top authors: openagenda (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,847 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: ▲1.07MB] [CPU: ▲0.51ms] Passed 4 tests

Server-side resources used by OpenAgenda
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.37 ▲0.9045.80 ▲8.77
Dashboard /wp-admin4.41 ▲1.1050.76 ▲3.47
Posts /wp-admin/edit.php4.52 ▲1.1653.70 ▲8.63
Add New Post /wp-admin/post-new.php7.06 ▲1.1787.63 ▼18.84
Media Library /wp-admin/upload.php4.33 ▲1.1040.89 ▲8.93
Settings /wp-admin/edit.php?post_type=oa-calendar&page=openagenda4.3036.32
Add New /wp-admin/post-new.php?post_type=oa-calendar7.06379.20
All Calendars /wp-admin/edit.php?post_type=oa-calendar4.3744.15

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 244 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_openagenda-preview-widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_openagenda-filter-widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for OpenAgenda
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲8914.17 ▼0.171.88 ▲0.3239.27 ▲1.12
Dashboard /wp-admin2,226 ▲495.58 ▼0.0991.83 ▼3.8838.85 ▼3.86
Posts /wp-admin/edit.php2,134 ▲342.01 ▲0.0339.68 ▼2.2935.44 ▼4.66
Add New Post /wp-admin/post-new.php1,565 ▲3923.29 ▼0.02671.26 ▲55.5066.38 ▲18.58
Media Library /wp-admin/upload.php1,431 ▲344.18 ▼0.0196.11 ▼8.0342.29 ▲0.92
Settings /wp-admin/edit.php?post_type=oa-calendar&page=openagenda9612.1023.3438.33
Add New /wp-admin/post-new.php?post_type=oa-calendar1,68216.68946.7135.13
All Calendars /wp-admin/edit.php?post_type=oa-calendar1,0951.9034.8030.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_openagenda-filter-widget
    • widget_theysaidso_widget
    • widget_openagenda-preview-widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 69× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/openagenda/vendor/guzzlehttp/psr7/src/MultipartStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/openagenda/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/openagenda/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/openagenda/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/openagenda/vendor/psr/http-client/src/RequestExceptionInterface.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/openagenda/inc/class-openagenda-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function openagenda_get_field() in wp-content/plugins/openagenda/templates/event-location.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/openagenda/vendor/psr/http-client/src/NetworkExceptionInterface.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/openagenda/vendor/guzzlehttp/psr7/src/FnStream.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/openagenda/vendor/guzzlehttp/psr7/src/ServerRequest.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: calendar, agenda, openagenda, events, event

openagenda/openagenda.php Passed 13 tests

The main PHP script in "OpenAgenda" version 2.8.0 is automatically included on every request by WordPress
52 characters long description:
Display your OpenAgenda data on your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected26,029 lines of code in 226 files:
LanguageFilesBlank linesComment linesLines of code
PHP1523,3037,19215,410
Markdown201,52904,118
JSON17003,601
CSS4202821,590
Sass114451,125
JavaScript1486154
SVG170017
XML12014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity15.45
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity2.99
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces14
Interfaces27
Traits3
Classes101
▷ Abstract classes10.99%
▷ Concrete classes10099.01%
▷ Final classes3737.00%
Methods972
▷ Static methods15115.53%
▷ Public methods80682.92%
▷ Protected methods484.94%
▷ Private methods11812.14%
Functions191
▷ Named functions8645.03%
▷ Anonymous functions10554.97%
Constants82
▷ Global constants33.66%
▷ Class constants7996.34%
▷ Public constants6379.75%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin