Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modules that slow down WP installation and breaks WP Cli profiling #34

Open
rafaellop opened this issue Sep 1, 2021 · 1 comment
Open

Comments

@rafaellop
Copy link

The file /src/Actions/Front/Schemas/PrintHeadJsonSchema.php adds about 0.22s (which is a lot) to the processing time when profiling an URL using the WP CLI. In particular this code:

$jsons = seopress_get_service('JsonSchemaGenerator')->getJsonsEncoded(['organization',]);

Also the file inc/functions/options-socia.php causes critical error when testing with WP CLI in the line 358. Error:

PHP Fatal error:  Uncaught Error: Call to undefined method PLL_Admin_Links::get_translation_url() 
in /wp-content/plugins/wp-seopress/inc/functions/options-social.php:358
Stack trace:
#0 /wp-includes/class-wp-hook.php(303): seopress_social_facebook_og_locale_hook('')
#1 /wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)
#2 /wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#3 /wp-includes/general-template.php(3015): do_action('wp_head')
#4 /wp-content/themes/theme/header.php(36): wp_head()
#5 /wp-includes/template.php(770): require_once('/home/klient.dh...')
#6 /wp-content/plugins/wp-seopress/inc/functions/options-social.php on line 358

Code responsible:

foreach (PLL()->model->get_languages_list() as $language) {
  if (PLL()->curlang->slug !== $language->slug && PLL()->links->get_translation_url($language) && isset($language->facebook)) {
    $alternates[] = $language->facebook;
  }
}
@wp-seopress
Copy link
Owner

Hi @rafaellop

thank you for this feedback.

Can you send us an email to [email protected] please? so we can provide you a beta version that should improve this (if you want, no obligation). Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants