83% flexblocks

Code Review | Flexblocks

WordPress plugin Flexblocks scored83%from 54 tests.

About plugin

  • Plugin page: flexblocks
  • Plugin version: 1.2.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 5, 2022
  • Latest release: Apr 4, 2023
  • Number of updates: 21
  • Update frequency: every 5.8 days
  • Top authors: cabezi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /992 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲1.49MB] [CPU: ▲5.33ms] Passed 4 tests

Server-side resources used by Flexblocks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.89 ▲1.4343.92 ▲2.91
Dashboard /wp-admin4.79 ▲1.4954.66 ▲6.36
Posts /wp-admin/edit.php4.84 ▲1.4850.46 ▲7.18
Add New Post /wp-admin/post-new.php7.87 ▲1.9994.50 ▲4.85
Media Library /wp-admin/upload.php4.77 ▲1.5449.00 ▲12.35
All Products /wp-admin/edit.php?post_type=cabezi_product4.7144.88
Pattern Category /wp-admin/edit-tags.php?taxonomy=cabezi-cpb-category&post_type=cabezi-cpb4.8140.75
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=cabezi_product4.7039.59
Add New /wp-admin/post-new.php?post_type=cabezi_product7.9494.59
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=cabezi_product4.7146.69
Flexblocks Pattern Archive /wp-admin/edit.php?post_type=cabezi-cpb4.7038.92

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 494 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
category_children
acf_version
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Flexblocks: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲14013.25 ▼1.145.35 ▲3.7043.78 ▲3.54
Dashboard /wp-admin2,274 ▲895.80 ▼0.0598.43 ▼2.2340.14 ▼1.29
Posts /wp-admin/edit.php2,139 ▲502.03 ▲0.0235.18 ▼2.0532.46 ▲0.14
Add New Post /wp-admin/post-new.php7,043 ▲5,52429.28 ▲6.301,076.43 ▲396.4148.43 ▼6.88
Media Library /wp-admin/upload.php2,009 ▲6218.39 ▲4.12227.28 ▲123.1450.00 ▲5.65
All Products /wp-admin/edit.php?post_type=cabezi_product1,1731.9531.5527.70
Pattern Category /wp-admin/edit-tags.php?taxonomy=cabezi-cpb-category&post_type=cabezi-cpb1,3963.0040.6526.98
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=cabezi_product1,4412.9743.1329.96
Add New /wp-admin/post-new.php?post_type=cabezi_product7,48126.761,036.3885.01
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=cabezi_product1,5773.3539.4531.38
Flexblocks Pattern Archive /wp-admin/edit.php?post_type=cabezi-cpb1,1471.9330.0930.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • category_children
    • can_compress_scripts
    • theysaidso_admin_options
    • acf_version
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 95× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_register_store() in wp-content/plugins/flexblocks/inc/acf/includes/local-fields.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/flexblocks/inc/acf/includes/admin/views/html-admin-form-top.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/flexblocks/inc/acf/includes/admin/views/html-admin-tools.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/flexblocks/inc/acf/includes/fields/class-acf-field-text.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/flexblocks/inc/acf/includes/fields/class-acf-field-message.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/flexblocks/inc/acf/includes/fields/class-acf-field-select.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/flexblocks/inc/acf/includes/admin/views/html-location-rule.php on line 4
    • > PHP Notice
      Undefined variable: active in wp-content/plugins/flexblocks/inc/acf/includes/admin/views/html-admin-tools.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/flexblocks/inc/acf/includes/fields/class-acf-field-wysiwyg.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function acf_add_deprecated_filter() in wp-content/plugins/flexblocks/inc/acf/includes/deprecated.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: page builder, block-editor, block library, flexbox, gutenberg blocks...

flexblocks/cabezi.php 77% from 13 tests

The main PHP script in "Flexblocks" version 1.2.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 141 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("flexblocks.php" instead of "cabezi.php")

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
No dangerous file extensions were detected197,131 lines of code in 418 files:
LanguageFilesBlank linesComment linesLines of code
PO File7760,217108,580108,358
JavaScript616,82710,25952,341
PHP17310,36321,62724,873
CSS227051,59011,289
SVG7700150
JSON800120

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity18.40
▷ Minimum class complexity1.00
▷ Maximum class complexity145.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes115
▷ Abstract classes21.74%
▷ Concrete classes11398.26%
▷ Final classes00.00%
Methods941
▷ Static methods10.11%
▷ Public methods92197.87%
▷ Protected methods00.00%
▷ Private methods202.13%
Functions529
▷ Named functions52098.30%
▷ Anonymous functions91.70%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/acf/assets/inc/datepicker/images/ui-icons_DDDDDD_256x240.png3.68KB4.17KB0.00%
inc/acf/assets/images/acf-logo.png3.40KB3.39KB0.23%
inc/acf/assets/inc/select2/3/select2.png0.51KB0.99KB0.00%
inc/acf/assets/inc/datepicker/images/ui-icons_ffffff_256x240.png3.68KB4.17KB0.00%
inc/acf/assets/inc/datepicker/images/ui-icons_444444_256x240.png3.68KB4.17KB0.00%