• Resolved jgasba

    (@jgasba)


    I’ve noticed that the plugin loads useless empty .css files like login-index.css la-index.css first-index.css etc

    Those are empty but requests are sent when a page loads, which slows down a website.
    What is the use of those? Are they filled with custom CSS styles according to users settings? Shouldn’t there be a check to only load if not empty? Or an option to concatenate them all into just 1 stylesheet?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Robin W

    (@robin-w)

    You are probably correct, but any ‘slowing’ will be miniscule as css is empty, and only on first load if the browser supports caching. You can use caching plugins to add these together and minimize if site load speed is really an issue for you.

    Yes in a perfect world, I would take a day out of my life to fix this, but I am just a guy sitting in his home writing free plugins for enjoyment.

    Sorry, I have no plans to fix this anytime soon.

    Thread Starter jgasba

    (@jgasba)

    Any minuscule gain is good to take when you serve 10000s of users daily (not counting the spam bots -_-) with the cheapest server possible to cut costs.

    I don’t know if you take contributions.
    I simply added a check for filesize before including the files in generate_css.php

        foreach ( $block_css_array as $slug => $css_filename) {
                // if file exists, enqueue with custom URL location
                if ( file_exists( $src . $css_filename ) ) {
                        if ( filesize( $src . $css_filename ) >= 2 ){
                                return;
                        }
                        //$location = home_url().'/'.$location ;
                        wp_enqueue_style( $slug, $src_url . $css_filename, array(), get_option( 'bsp_version' ) );
                }
                // else, enqueue with default URL location
                else {
                        if ( filesize( bsp_default_full_block_location( 'url', 'css' ) . $css_filename ) >= 2 ){
                                return;
                        }
                        wp_enqueue_script( $slug, bsp_default_full_block_location( 'url', 'css' ) . $css_filename, array(), get_option( 'bsp_version' ) );
                }
        }
    Thread Starter jgasba

    (@jgasba)

    (buggy editor duplicated post)

    • This reply was modified 1 year, 1 month ago by jgasba.
    Plugin Author Robin W

    (@robin-w)

    Always happy to improve my plugin, and thanks for looking at this.

    I’ll take a look at the code later, and incorporate it if happy.

    πŸ™‚

    Plugin Author Robin W

    (@robin-w)

    incorporated into version 6.2.9 just released – can you update, test and confirm all ok please?

    Thread Starter jgasba

    (@jgasba)

    Fixed it too. πŸ‘πŸ‘ Thanks. Have a good one

    Plugin Author Robin W

    (@robin-w)

    That’s great to hear – thanks for your help

    Plugin Author Robin W

    (@robin-w)

    You will see there is a support request for :

    Warning: filesize(): stat failed for https://ghazavatonline.com/wp-content/plugins/bbp-style-pack/build/la-index.css in /home/ghazavat/public_html/wp-content/plugins/bbp-style-pack/includes/generate_css.php on line 619

    Warning: filesize(): stat failed for https://ghazavatonline.com/wp-content/plugins/bbp-style-pack/build/login-index.css in /home/ghazavat/public_html/wp-content/plugins/bbp-style-pack/includes/generate_css.php on line 619

    Warning: filesize(): stat failed for https://ghazavatonline.com/wp-content/plugins/bbp-style-pack/build/topic-views-index.css in /home/ghazavat/public_html/wp-content/plugins/bbp-style-pack/includes/generate_css.php on line 619

    If you could help, that would be great πŸ™‚ If not, I’ll have to do some digging

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Plugin adding 12 CSS requests to my site’ is closed to new replies.