79% multisite-shared-blocks

Code Review | Multisite Shared Blocks

WordPress plugin Multisite Shared Blocks scored79%from 54 tests.

About plugin

  • Plugin page: multisite-shared-...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4
  • WordPress version: 6.3.1
  • First release: Oct 7, 2022
  • Latest release: Nov 21, 2023
  • Number of updates: 3
  • Update frequency: every 144.7 days
  • Top authors: petitphp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /608 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.54ms] Passed 4 tests

An overview of server-side resources used by Multisite Shared Blocks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.18 ▼8.90
Dashboard /wp-admin3.31 ▼0.0445.54 ▼18.02
Posts /wp-admin/edit.php3.36 ▲0.0048.63 ▲0.90
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.77 ▼4.13
Media Library /wp-admin/upload.php3.23 ▲0.0033.72 ▲2.04

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 149 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Multisite Shared Blocks: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.34 ▼0.011.63 ▼0.1742.32 ▼4.20
Dashboard /wp-admin2,198 ▲205.63 ▼0.0985.71 ▼23.0237.28 ▼8.96
Posts /wp-admin/edit.php2,103 ▲61.94 ▼0.0940.54 ▲2.7336.80 ▼2.51
Add New Post /wp-admin/post-new.php1,526 ▼123.25 ▲0.08661.38 ▲16.1252.98 ▼11.01
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.01101.56 ▲6.2541.84 ▲1.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The following issues need your attention
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/multisite-shared-blocks/views/admin/admin-page.php
    • > /wp-content/plugins/multisite-shared-blocks/multisite-shared-blocks.php
    • > /wp-content/plugins/multisite-shared-blocks/views/block-excerpt.php
    • > /wp-content/plugins/multisite-shared-blocks/views/preview.php
  • 109× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-shared-blocks/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-shared-blocks/vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-shared-blocks/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-shared-blocks/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-shared-blocks/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-shared-blocks/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-shared-blocks/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-shared-blocks/vendor/composer/installers/src/Composer/Installers/SMFInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-shared-blocks/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-shared-blocks/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: share, multisite, block, network, gutenberg

multisite-shared-blocks/multisite-shared-blocks.php Passed 13 tests

The main PHP script in "Multisite Shared Blocks" version 1.1.0 is automatically included on every request by WordPress
37 characters long description:
Share blocks between network's sites.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin5,075 lines of code in 145 files:
LanguageFilesBlank linesComment linesLines of code
PHP1361,0192,2364,763
JSON200192
YAML3300111
JavaScript2068
CSS2101

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces9
Interfaces0
Traits1
Classes123
▷ Abstract classes21.63%
▷ Concrete classes12198.37%
▷ Final classes1411.57%
Methods251
▷ Static methods5521.91%
▷ Public methods17670.12%
▷ Protected methods4819.12%
▷ Private methods2710.76%
Functions13
▷ Named functions323.08%
▷ Anonymous functions1076.92%
Constants13
▷ Global constants646.15%
▷ Class constants753.85%
▷ Public constants457.14%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin