78% blocksy-companion

Code Review | Blocksy Companion

WordPress plugin Blocksy Companion scored78%from 54 tests.

About plugin

  • Plugin page: blocksy-companion
  • Plugin version: 2.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Apr 11, 2019
  • Latest release: Nov 30, 2023
  • Number of updates: 361
  • Update frequency: every 4.7 days
  • Top authors: creativethemeshq (100%)

Code review

54 tests

User reviews

54 reviews

Install metrics

100,000+ active /5,040,878 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.19MB] [CPU: ▼4.63ms] Passed 4 tests

Server-side resources used by Blocksy Companion
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1336.11 ▼6.04
Dashboard /wp-admin3.51 ▲0.2148.43 ▼3.77
Posts /wp-admin/edit.php3.62 ▲0.2747.93 ▼0.90
Add New Post /wp-admin/post-new.php6.09 ▲0.2191.99 ▼7.81
Media Library /wp-admin/upload.php3.43 ▲0.2136.17 ▲3.67

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 314 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Blocksy Companion
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲5914.20 ▼0.141.64 ▲0.0336.11 ▼6.58
Dashboard /wp-admin2,226 ▲485.62 ▼0.0891.83 ▼21.3943.25 ▼0.00
Posts /wp-admin/edit.php2,131 ▲281.98 ▼0.0439.55 ▼4.0535.89 ▲0.68
Add New Post /wp-admin/post-new.php1,538 ▲1223.43 ▲0.25633.24 ▼11.1556.32 ▼5.42
Media Library /wp-admin/upload.php1,432 ▲384.22 ▼0.0397.38 ▲1.9442.30 ▲0.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/blocksy-companion/framework/views/optin.php
  • 65× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Blocksy\\Extensions\ewsletterSubscribe\\Provider' not found in wp-content/plugins/blocksy-companion/framework/extensions/newsletter-subscribe/providers/demo.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/blocksy-companion/framework/features/header/modal/login.php:5
    • > PHP Notice
      Undefined variable: filter in wp-content/plugins/blocksy-companion/framework/features/conditions/rules/specific.php on line 35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_editable_roles() in wp-content/plugins/blocksy-companion/framework/features/conditions/rules/user-auth.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/blocksy-companion/framework/extensions/cookies-consent/config.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/blocksy-companion/framework/extensions/product-reviews/config.php:5
    • > PHP Notice
      Undefined variable: filter in wp-content/plugins/blocksy-companion/framework/features/conditions/rules/specific.php on line 35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/blocksy-companion/framework/features/header/modal/lostpassword.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/blocksy-companion/framework/features/header/items/account/options.php:4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/import.php): failed to open stream: No such file or directory in wp-content/plugins/blocksy-companion/framework/features/demo-install/wp-importer.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: Contributors not specified
You can take inspiration from this readme.txt

blocksy-companion/blocksy-companion.php Passed 13 tests

The principal PHP file in "Blocksy Companion" v. 2.0.4 is loaded by WordPress automatically on each request
135 characters long description:
This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin82,694 lines of code in 290 files:
LanguageFilesBlank linesComment linesLines of code
PO File2025,58046,78051,846
PHP973,7391,06817,971
JavaScript1111,54726510,354
Sass504871152,444
SVG20269
CSS10106010

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 116)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity31.23
▷ Minimum class complexity1.00
▷ Maximum class complexity189.00
Average method complexity5.09
▷ Minimum method complexity1.00
▷ Maximum method complexity116.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes52
▷ Abstract classes00.00%
▷ Concrete classes52100.00%
▷ Final classes00.00%
Methods341
▷ Static methods174.99%
▷ Public methods28082.11%
▷ Protected methods30.88%
▷ Private methods5817.01%
Functions164
▷ Named functions2213.41%
▷ Anonymous functions14286.59%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected