67% blockspare

Code Review | Blockspare - Create Your Own Website with Expert-Designed Blog, News, Magazine, and Business Sections for Gutenberg (Templates, Patterns, and Page Builder)

WordPress plugin Blockspare - Create Your Own Website with Expert-Designed Blog, News, Magazine, and Business Sections for Gutenberg (Templates, Patterns, and Page Builder) scored67%from 54 tests.

About plugin

  • Plugin page: blockspare
  • Plugin version: 2.7.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Apr 1, 2020
  • Latest release: Nov 7, 2023
  • Number of updates: 66
  • Update frequency: every 20.0 days
  • Top authors: blockspare (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

10,000+ active /326,904 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲7.17MB] [CPU: ▲40.88ms] 50% from 4 tests

Analyzing server-side resources used by Blockspare - Create Your Own Website with Expert-Designed Blog, News, Magazine, and Business Sections for Gutenberg (Templates, Patterns, and Page Builder)
Please take the time to fix the following items
  • RAM: The total memory usage must be kept under 10MB (currently 10.62MB on /wp-admin/admin.php?page=freemius)
  • Extra RAM: The extra memory usage should kept under 5MB (currently 7.17MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /10.64 ▲7.1879.70 ▲35.45
Dashboard /wp-admin10.45 ▲7.1495.21 ▲42.19
Posts /wp-admin/edit.php10.56 ▲7.20100.65 ▲50.76
Add New Post /wp-admin/post-new.php13.59 ▲7.70131.52 ▲35.11
Media Library /wp-admin/upload.php10.38 ▲7.1588.56 ▲53.50
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius10.6278.99

Server storage [IO: ▲9.69MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 437 new files
Database: no new tables, 11 new options
New WordPress options
can_compress_scripts
blockspare_upgrade_notice_start_time
widget_recent-posts
theysaidso_admin_options
db_upgraded
fs_debug_mode
widget_recent-comments
fs_active_plugins
widget_theysaidso_widget
fs_accounts
...

Browser metrics Passed 4 tests

Blockspare - Create Your Own Website with Expert-Designed Blog, News, Magazine, and Business Sections for Gutenberg (Templates, Patterns, and Page Builder): an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,004 ▲23215.12 ▲0.377.70 ▲5.8228.22 ▼17.11
Dashboard /wp-admin2,304 ▲1306.49 ▲0.85124.06 ▲26.6647.06 ▲4.29
Posts /wp-admin/edit.php2,221 ▲1183.52 ▲1.5043.74 ▲1.5731.98 ▼6.32
Add New Post /wp-admin/post-new.php1,595 ▲6027.21 ▲4.38785.95 ▲135.1659.46 ▲8.42
Media Library /wp-admin/upload.php1,587 ▲1845.98 ▲1.70104.34 ▼0.9446.12 ▲1.79
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,1693.3237.0628.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/blockspare/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 11 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • fs_accounts
    • widget_recent-comments
    • fs_active_plugins
    • can_compress_scripts
    • widget_recent-posts
    • blockspare_current_version_installed
    • fs_debug_mode
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/blockspare/blockspare.php
    • > /wp-content/plugins/blockspare/inc/init.php
  • 36× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Blockspare\\Layouts\\add_action() in wp-content/plugins/blockspare/inc/layout/components.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blockspare/inc/post-banner/banner-1/index.php:88
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Blockspare\\Layouts\\add_action() in wp-content/plugins/blockspare/inc/layout/endpoints.php:30
    • > PHP Warning
      Use of undefined constant BLOCKSPARE_PLUGIN_DIR - assumed 'BLOCKSPARE_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/blockspare/inc/template-library/blocks/block-lists.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blockspare/inc/other-block/search/index.php:146
    • > PHP Fatal error
      require_once(): Failed opening required 'BLOCKSPARE_PLUGIN_DIRinc/template-library/blocks/accordion/class-accordion.php' (include_path='.:/usr/share/php') in wp-content/plugins/blockspare/inc/template-library/blocks/block-lists.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blockspare/inc/latest-post-block/posts-slider/index.php:430
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blockspare/admin/rest-request.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blockspare/inc/latest-post-block/posts-list/index.php:95
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/blockspare/inc/layout/class-image-importer.php on line 21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: gutenberg, page builder, magazine, free, patterns...

blockspare/blockspare.php 92% from 13 tests

The main PHP file in "Blockspare - Create Your Own Website with Expert-Designed Blog, News, Magazine, and Business Sections for Gutenberg (Templates, Patterns, and Page Builder)" ver. 2.7.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 142 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected56,868 lines of code in 291 files:
LanguageFilesBlank linesComment linesLines of code
PHP20510,19518,18844,202
JSON11005,023
JavaScript391,1593114,308
CSS33691452,126
Sass116983979
Markdown1680214
XML13016

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity48.91
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.37
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes97
▷ Abstract classes22.06%
▷ Concrete classes9597.94%
▷ Final classes11.05%
Methods1,407
▷ Static methods25418.05%
▷ Public methods1,01071.78%
▷ Protected methods191.35%
▷ Private methods37826.87%
Functions217
▷ Named functions18987.10%
▷ Anonymous functions2812.90%
Constants186
▷ Global constants10858.06%
▷ Class constants7841.94%
▷ Public constants78100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
88 PNG files occupy 0.38MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/images/blockspare-posts-block-list-layout-4.4259edfb.png0.92KB0.47KB▼ 48.99%
dist/images/blockspare-posts-block-grid-layout-4.2c93b2bb.png0.82KB0.46KB▼ 44.47%
dist/images/pricingtable-layout-3.a1c4c8a7.png2.56KB1.26KB▼ 50.67%
dist/images/blockspare-posts-carousel-grid-layout-3.b310ab68.png0.91KB0.48KB▼ 47.58%
dist/images/blockspare-header-layout-1.fa2f83a7.png1.79KB0.66KB▼ 62.84%