Making WordPress.org


Ignore:
Timestamp:
08/03/2020 05:12:17 PM (5 years ago)
Author:
ryelle
Message:

Plugin Directory: Add a total size check for block plugins

This will trigger a warning if the total size of the plugin exceeds 1MB. A larger plugin will cause a longer wait when inserting into the editor, which degrades the user experience.

See #5303

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-block-validator.php

    r10110 r10111  
    324324                    'https://developer.wordpress.org/block-editor/developers/internationalization/'
    325325                );
     326            case 'check_total_size':
     327                return __( 'Larger plugins will take longer to install. This is more noticeable in the Block Directory, where the user expects blocks to be added immediately. Try reducing your file size by optimizing images & SVGs, only including the assets you need (images, fonts, etc), and using core-provided JavaScript libraries.', 'wporg-plugins' );
    326328            // This is a special case, since multiple values may be collapsed.
    327329            case 'check_block_json_is_valid':
Note: See TracChangeset for help on using the changeset viewer.