89% fabrica-reusable-block-instances

Code Review | Fabrica Synced Pattern Instances

WordPress plugin Fabrica Synced Pattern Instances scored89%from 54 tests.

About plugin

  • Plugin page: fabrica-reusable-...
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 18, 2019
  • Latest release: Sep 19, 2023
  • Number of updates: 15
  • Update frequency: every 107.7 days
  • Top authors: yeswework (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /3,191 total downloads

Benchmarks

Plugin footprint 83% from 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.09MB] [CPU: ▼1.47ms] Passed 4 tests

This is a short check of server-side resources used by Fabrica Synced Pattern Instances
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0740.81 ▲0.51
Dashboard /wp-admin3.39 ▲0.0948.62 ▼3.32
Posts /wp-admin/edit.php3.51 ▲0.1548.79 ▼2.78
Add New Post /wp-admin/post-new.php5.99 ▲0.1093.38 ▼0.29
Media Library /wp-admin/upload.php3.32 ▲0.0835.47 ▲1.08
Add New /wp-admin/post-new.php?post_type=wp_block5.9879.73
All Patterns /wp-admin/edit.php?post_type=wp_block3.3734.39

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Fabrica Synced Pattern Instances: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲3414.51 ▲0.161.87 ▼0.0245.43 ▲0.55
Dashboard /wp-admin2,226 ▲525.50 ▼0.0881.28 ▼5.1738.80 ▼2.88
Posts /wp-admin/edit.php2,134 ▲342.02 ▲0.0339.88 ▲1.0240.64 ▲8.81
Add New Post /wp-admin/post-new.php1,563 ▲3718.46 ▼4.84607.42 ▼44.7863.76 ▲9.43
Media Library /wp-admin/upload.php1,431 ▲284.23 ▼0.0393.50 ▼8.1242.07 ▼3.63
Add New /wp-admin/post-new.php?post_type=wp_block1,55516.95870.8837.58
All Patterns /wp-admin/edit.php?post_type=wp_block1,2246.6372.5531.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

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
These attributes need to be fixed: You can look at the official readme.txt

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

This is the main PHP file of "Fabrica Synced Pattern Instances" version 1.0.7, 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 Synced Pattern has been used.

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin286 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24225210
JavaScript110355
CSS15121

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods22100.00%
▷ Public methods1881.82%
▷ Protected methods00.00%
▷ Private methods418.18%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 1.34MB with 0.72MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png156.77KB169.25KB0.00%
assets/screenshot-3.png260.40KB69.76KB▼ 73.21%
assets/screenshot-2.png198.24KB57.64KB▼ 70.93%
assets/icon-128x128.png9.35KB3.85KB▼ 58.78%
assets/icon-256x256.png21.18KB6.98KB▼ 67.05%