10% webinara

Code Review | Webinara

WordPress plugin Webinara scored10%from 54 tests.

About plugin

  • Plugin page: webinara
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.3
  • WordPress version: 6.3.1
  • First release: Sep 12, 2019
  • Latest release: Nov 25, 2019
  • Number of updates: 11
  • Update frequency: every 7.0 days
  • Top authors: kristianhaa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,140 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/webinara/includes/class-webinara-meta-box.php+1064
    Undefined index: post_type

Server metrics [RAM: ▲0.43MB] [CPU: ▼26.81ms] Passed 4 tests

This is a short check of server-side resources used by Webinara
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.81 ▲1.3552.08 ▲11.96
Dashboard /wp-admin4.39 ▲1.0435.16 ▼26.06
Posts /wp-admin/edit.php4.39 ▲1.0334.26 ▼17.23
Add New Post /wp-admin/post-new.php4.39 ▼1.5037.64 ▼64.90
Media Library /wp-admin/upload.php4.39 ▲1.1635.99 ▲0.95
All Events /wp-admin/edit.php?post_type=event4.3932.76
Add New Event /wp-admin/post-new.php?post_type=event4.3935.57
Event tags /wp-admin/edit-tags.php?taxonomy=event_tag&post_type=webinar4.3934.28
Dashboard /wp-admin/edit.php?post_type=webinar&page=webinara_dashboard4.3935.13
Add New Webinar /wp-admin/post-new.php?post_type=webinar4.3934.14
Settings /wp-admin/edit.php?post_type=webinar&page=webinara_plugin4.3932.24
Configure Fields /wp-admin/edit.php?post_type=webinar&page=webinara-form-field4.3934.39
All Webinars /wp-admin/edit.php?post_type=webinar4.3933.02
Event Categories /wp-admin/edit-tags.php?taxonomy=event_categories&post_type=webinar4.3933.84

Server storage [IO: ▲0.70MB] [DB: ▲0.12MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 35 new files
Database: no new tables, 15 new options
New WordPress options
event_categories_children
_webi_webinars_per_page
can_compress_scripts
theysaidso_admin_options
_webi_eventform_fields
_webi_enable_webinars
_webi_webinarform_fields
_webi_webinars_page_id
_webi_enable_events
_webi_events_per_page
...

Browser metrics Passed 4 tests

Webinara: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,018 ▲27214.37 ▼0.016.75 ▲5.1244.56 ▲3.20
Dashboard /wp-admin2,288 ▲1035.31 ▼0.69112.15 ▲3.1189.84 ▲47.62
Posts /wp-admin/edit.php2,191 ▲1022.62 ▲0.5843.29 ▲0.5835.16 ▲0.12
Add New Post /wp-admin/post-new.php1,606 ▲8723.36 ▲0.15737.64 ▲89.1035.97 ▼22.62
Media Library /wp-admin/upload.php1,473 ▲884.64 ▲0.43103.83 ▲2.5880.45 ▲34.11
All Events /wp-admin/edit.php?post_type=event1,1582.4836.5151.20
Add New Event /wp-admin/post-new.php?post_type=event15,34910.76380.33205.61
Event tags /wp-admin/edit-tags.php?taxonomy=event_tag&post_type=webinar1,3422.1931.9732.00
Dashboard /wp-admin/edit.php?post_type=webinar&page=webinara_dashboard8972.1129.0527.84
Add New Webinar /wp-admin/post-new.php?post_type=webinar16,05610.57368.97196.59
Settings /wp-admin/edit.php?post_type=webinar&page=webinara_plugin1,2162.8045.6227.44
Configure Fields /wp-admin/edit.php?post_type=webinar&page=webinara-form-field1,5762.1532.2432.24
All Webinars /wp-admin/edit.php?post_type=webinar1,1522.5235.8349.30
Event Categories /wp-admin/edit-tags.php?taxonomy=event_categories&post_type=webinar7,8422.2339.7949.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • event_categories_children
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=event_categories&post_type=webinar
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=webinar
    • > Notice in wp-content/plugins/webinara/includes/class-webinara-meta-box.php+1064
    Undefined index: post_type
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=webinar
    • > Notice in wp-content/plugins/webinara/includes/class-webinara-meta-box.php+83
    Undefined index: title
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=webinar
    • > Notice in wp-content/plugins/webinara/includes/class-webinara-meta-box.php+83
    Trying to access array offset on value of type null
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=webinar
    • > Warning in wp-content/plugins/webinara/includes/class-webinara-meta-box.php+309
    count(): Parameter must be an array or an object that implements Countable
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=webinar
    • > Notice in wp-content/plugins/webinara/includes/class-webinara-meta-box.php+309
    Uninitialized string offset: 0
    • > GET request to /wp-admin/post-new.php?post_type=webinar
    • > Notice in wp-content/plugins/webinara/includes/class-webinara-meta-box.php+815
    Undefined variable: wplatform

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/webinara/templates/single-webinar.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/webinara/templates/single-event.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webinara/includes/class-webinara-field-editor.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/webinara/includes/class-webinara.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

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
6 plugin tags: webinar management, events, event management, webinar, event...

webinara/webinara.php Passed 13 tests

"Webinara" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
76 characters long description:
The easiest way to create powerful webinar management system with WordPress.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin13,087 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP112732005,964
JavaScript95133445,129
CSS6198221,594
LESS11025400

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 145)
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity126.83
▷ Minimum class complexity1.00
▷ Maximum class complexity490.00
Average method complexity12.98
▷ Minimum method complexity1.00
▷ Maximum method complexity145.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods63
▷ Static methods23.17%
▷ Public methods6196.83%
▷ Protected methods00.00%
▷ Private methods23.17%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/images/chosen-sprite@2x.png0.72KB0.83KB0.00%
includes/assets/images/default_speaker.png2.63KB1.37KB▼ 47.89%
includes/assets/images/attachment.png2.95KB2.31KB▼ 21.55%
includes/assets/images/chosen-sprite.png0.53KB0.88KB0.00%
includes/assets/images/logo-webinara-20x20.png0.99KB0.80KB▼ 19.45%