84% convert-to-blocks

Code Review | Convert to Blocks

WordPress plugin Convert to Blocks scored84%from 54 tests.

About plugin

  • Plugin page: convert-to-blocks
  • Plugin version: 1.2.2
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.3
  • WordPress version: 6.3.1
  • First release: Feb 15, 2021
  • Latest release: Oct 17, 2023
  • Number of updates: 8
  • Update frequency: every 137.4 days
  • Top authors: 10up (75%)10upbot (37.5%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active /21,040 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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Convert to Blocks
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.12 ▼5.59
Dashboard /wp-admin3.31 ▼0.0451.05 ▼8.73
Posts /wp-admin/edit.php3.36 ▲0.0048.55 ▼0.83
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.09 ▼19.79
Media Library /wp-admin/upload.php3.23 ▲0.0030.05 ▼4.29

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Convert to Blocks
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.23 ▼0.121.74 ▲0.2237.07 ▼2.36
Dashboard /wp-admin2,198 ▲215.62 ▼0.0593.46 ▲7.5941.90 ▼1.41
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0239.03 ▼2.1338.42 ▲1.12
Add New Post /wp-admin/post-new.php1,528 ▼2123.18 ▲4.91656.82 ▲12.0346.74 ▼16.35
Media Library /wp-admin/upload.php1,403 ▼04.20 ▼0.02101.36 ▲9.2241.47 ▼0.28

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/convert-to-blocks/includes/ConvertToBlocks/MigrationCommand.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function convert_to_blocks_define() in wp-content/plugins/convert-to-blocks/config.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/convert-to-blocks/convert-to-blocks.php:71

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
6 plugin tags: gutenberg migration, convert to blocks, block migration, gutenberg, gutenberg conversion...

convert-to-blocks/convert-to-blocks.php 92% from 13 tests

The main PHP file in "Convert to Blocks" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.7" instead of "6.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin933 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP12295712932
JavaScript1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity10.70
▷ Minimum class complexity3.00
▷ Maximum class complexity35.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods80
▷ Static methods11.25%
▷ Public methods80100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin