10% yawave

Code Review | Yawave

WordPress plugin Yawave scored10%from 54 tests.

About plugin

  • Plugin page: yawave
  • Plugin version: 2.5.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8.1
  • WordPress version: 6.3.1
  • First release: Nov 25, 2020
  • Latest release: Oct 17, 2022
  • Number of updates: 424
  • Update frequency: every 1.6 days
  • Top authors: yawaveadmin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,539 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/yawave/yawave.php+59
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.96MB] [CPU: ▼65.63ms] Passed 4 tests

Analyzing server-side resources used by Yawave
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.447.78 ▼36.98
Dashboard /wp-admin2.05 ▼1.267.57 ▼45.49
Posts /wp-admin/edit.php2.05 ▼1.316.37 ▼65.69
Add New Post /wp-admin/post-new.php2.05 ▼3.846.64 ▼114.36
Media Library /wp-admin/upload.php2.05 ▼1.186.10 ▼29.85
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=publication2.056.69
Settings /wp-admin/admin.php?page=yawave-setting-admin2.057.41
Add New /wp-admin/post-new.php?post_type=publication2.055.70
All Items /wp-admin/edit.php?post_type=publication2.056.44
Types /wp-admin/edit-tags.php?taxonomy=media_type&post_type=publication2.057.87
Portals /wp-admin/edit-tags.php?taxonomy=portal&post_type=publication2.055.92
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=publication2.056.60
Liveblogs /wp-admin/admin.php?page=yawave-setting-admin-liveblog2.058.43

Server storage [IO: ▲1.13MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 59 new files
Database: 3 new tables, 8 new options
New tables
wp_yawave_liveblogs
wp_yawave_log
wp_yawave_liveblogs_posts
New WordPress options
widget_recent-posts
widget_theysaidso_widget
category_children
yawave_db_version
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Yawave: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,474 ▲71325.90 ▲11.5343.74 ▲41.8837.83 ▼4.90
Dashboard /wp-admin2,527 ▲35011.63 ▲6.10121.72 ▲16.6345.59 ▼2.38
Posts /wp-admin/edit.php2,641 ▲53814.45 ▲12.44223.63 ▲178.4935.11 ▼4.33
Add New Post /wp-admin/post-new.php6,251 ▲4,71618.95 ▲0.54824.05 ▲203.3839.66 ▼27.13
Media Library /wp-admin/upload.php1,883 ▲48010.95 ▲6.77142.63 ▲34.3653.16 ▲7.16
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=publication1,79010.1172.5436.15
Settings /wp-admin/admin.php?page=yawave-setting-admin1,19210.0273.8830.44
Add New /wp-admin/post-new.php?post_type=publication6,23922.11722.5235.04
All Items /wp-admin/edit.php?post_type=publication1,30621.10246.6729.79
Types /wp-admin/edit-tags.php?taxonomy=media_type&post_type=publication1,59610.1371.6035.01
Portals /wp-admin/edit-tags.php?taxonomy=portal&post_type=publication1,60110.1674.2534.66
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=publication1,65210.2491.7749.40
Liveblogs /wp-admin/admin.php?page=yawave-setting-admin-liveblog1,31610.0668.7931.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/yawave/yawave.php+59
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_yawave_log
    • wp_yawave_liveblogs_posts
    • wp_yawave_liveblogs
  • The uninstall procedure has failed, leaving 8 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • yawave_db_version
    • category_children
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 35 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > Notice in wp-content/plugins/yawave/yawave.php+63
    Trying to access array offset on value of type bool
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-wp-sdk-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-livelog-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-liveblog-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-focuspoint-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-focuspoint-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-app-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-wp-sdk-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-liveblog-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-livelog-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-focuspoint-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-focuspoint-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-app-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-liveblog-block handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-liveblog-block-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-publications-block handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the yawave-publications-block-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=publication
    • > User notice in wp-includes/functions.php+5905
    Function is_feed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

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
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yawave/includes/shortcode.liveblog.php:66
    • > PHP Fatal error
      Uncaught Error: Class 'Yawave\\WP_Async_Request' not found in wp-content/plugins/yawave/includes/class-importer-request.php:4
    • > PHP Fatal error
      Trait 'Yawave\\WP_Yawave_Importer' not found in wp-content/plugins/yawave/includes/class-importer-process.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Yawave\\WP_Async_Request' not found in wp-content/plugins/yawave/includes/wp-background-process.php:17
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/yawave/includes/settings.liveblogs.details.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/yawave/includes/settings.liveblogs.details.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Yawave\\is_admin() in wp-content/plugins/yawave/includes/settings.php:676
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/yawave/includes/settings.liveblogs.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yawave/includes/shortcodes.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Yawave\\add_action() in wp-content/plugins/yawave/includes/metadata.php:26

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=yawave-setting-admin-liveblog
    • > Javascript (severe) in unknown
    /wp-content/plugins/yawave/assets/js/yawave.sdk.js?ver=1.0 0:187 Uncaught ReferenceError: yawavesdkobject is not defined
    • > GET request to /wp-admin/edit.php?post_type=publication
    • > Console-api (severe) in unknown
    https://s3.eu-central-1.amazonaws.com/yawave-analytics.master.yawave/bundle.js 0:10409 "[Storage] rl_user_id should be string"
    • > GET request to /wp-admin/edit.php?post_type=publication
    • > Network (severe)
    https://api.yawave.com/core/yawave-tenant/open/sdk/track?ssoBaseUrl=https%3A%2F%2Fsso.yawave.com%2Fauth&realm=&lang=de&appId=null&referrer=http%3A%2F%2Fwp.com%2Fwp-admin%2Fedit.php%3Fpost_type%3Dpublication&post_type=publication&cookiesDeny=no - Failed to load resource: the server responded with a status of 400 (Bad Request)
    • > GET request to /wp-admin/edit.php?post_type=publication
    • > Console-api (severe) in unknown
    https://s3.eu-central-1.amazonaws.com/yawave-sdk.master.yawave/static/js/main.6e37d168.chunk.js 0:44829 "YawaveSDK: You do not have sufficient permissions to perform this action."

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: yawave, publizieren, analysieren, kommunikation, content marketing...

yawave/yawave.php 92% from 13 tests

The principal PHP file in "Yawave" v. 2.5.6 is loaded by WordPress automatically on each request
Please make the necessary changes and 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 glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin4,289 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP181,3637583,271
CSS4553338
JavaScript65511277
PO File19193274
SVG201073
SQL13056

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity28.53
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces1
Interfaces0
Traits6
Classes9
▷ Abstract classes222.22%
▷ Concrete classes777.78%
▷ Final classes00.00%
Methods132
▷ Static methods00.00%
▷ Public methods10982.58%
▷ Protected methods2216.67%
▷ Private methods10.76%
Functions37
▷ Named functions2772.97%
▷ Anonymous functions1027.03%
Constants21
▷ Global constants21100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.88MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/yawave_logo.png2.87KB2.11KB▼ 26.29%
assets/screenshot-3.png136.25KB35.49KB▼ 73.96%
assets/img/liveblog/icons/yellow_card-hand.png0.97KB0.59KB▼ 39.18%
assets/img/liveblog/icons/ball-icon.png0.68KB0.46KB▼ 32.66%
assets/img/menue-icon.png0.36KB0.54KB0.00%