99% fabrica-reusable-block-instances

Code Review | Fabrica Reusable Block Instances

WordPress plugin Fabrica Reusable Block Instances scored 99% from 53 tests.

About plugin

  • Plugin page: fabrica-reusable-...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2
  • WordPress version: 5.8.1
  • First release: Apr 18, 2019
  • Latest release: May 19, 2019
  • Number of updates: 8
  • Update frequency: every 3.9 days
  • Top authors: yeswework (100%)

Code review

53 tests

User reviews

3 reviews

Install metrics

200+ active / 1,248 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼283.87ms] Passed 4 tests

A check of server-side resources used by Fabrica Reusable Block Instances
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1339.43 ▲17.17
Dashboard /wp-admin3.09 ▲0.0342.72 ▲0.64
Posts /wp-admin/edit.php3.14 ▲0.0343.85 ▼0.45
Add New Post /wp-admin/post-new.php5.45 ▲0.0291.69 ▼1,126.35
Media Library /wp-admin/upload.php3.03 ▲0.0228.83 ▼9.32
All Reusable blocks /wp-admin/edit.php?post_type=wp_block3.0833.93
Add New /wp-admin/post-new.php?post_type=wp_block5.4381.85

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Fabrica Reusable Block Instances
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,709 ▲10315.88 ▲0.387.76 ▼0.5546.43 ▼0.07
Dashboard /wp-admin2,990 ▲1375.95 ▲0.09137.38 ▲1.63101.19 ▼4.27
Posts /wp-admin/edit.php2,737 ▲342.68 ▼0.0062.54 ▲2.1388.08 ▼4.88
Add New Post /wp-admin/post-new.php1,688 ▼34818.85 ▲1.07354.20 ▼11.69106.25 ▲1.38
Media Library /wp-admin/upload.php1,806 ▲315.05 ▲0.05167.38 ▲19.56107.82 ▼11.79
All Reusable blocks /wp-admin/edit.php?post_type=wp_block1,5177.45133.2465.51
Add New /wp-admin/post-new.php?post_type=wp_block5,63716.34389.76106.01

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed: Please take inspiration from this readme.txt

fabrica-reusable-block-instances/fabrica-reusable-block-instances.php Passed 13 tests

This is the main PHP file of "Fabrica Reusable Block Instances" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
68 characters long description:
Shows you how many times, and where, a Reusable Block has been used.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin66 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131266

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 1 test

Image compression 0% from 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 1.34MB with 0.76MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png21.18KB6.98KB▼ 67.05%
assets/banner-1544x500.png571.38KB632.73KB0.00%
assets/screenshot-3.png260.40KB69.76KB▼ 73.21%
assets/screenshot-1.png152.28KB43.51KB▼ 71.43%
assets/screenshot-2.png198.24KB57.64KB▼ 70.93%