84% atomic-blocks

Code Review | Atomic Blocks - Gutenberg Blocks Collection

WordPress plugin Atomic Blocks - Gutenberg Blocks Collection scored84%from 54 tests.

About plugin

  • Plugin page: atomic-blocks
  • Plugin version: 2.9.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.5
  • WordPress version: 6.3.1
  • First release: Mar 26, 2018
  • Latest release: Oct 28, 2020
  • Number of updates: 813
  • Update frequency: every 1.2 days
  • Top authors: atomicblocks (98.52%)

Code review

54 tests

User reviews

42 reviews

Install metrics

20,000+ active /1,062,192 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.21MB] [CPU: ▼19.06ms] Passed 4 tests

An overview of server-side resources used by Atomic Blocks - Gutenberg Blocks Collection
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.36 ▼3.35
Dashboard /wp-admin3.36 ▲0.0250.16 ▼14.58
Posts /wp-admin/edit.php3.47 ▲0.1246.23 ▼6.91
Add New Post /wp-admin/post-new.php4.90 ▼0.9854.73 ▼51.41
Media Library /wp-admin/upload.php3.28 ▲0.0537.64 ▼1.01
Settings /wp-admin/admin.php?page=atomic-blocks-plugin-settings3.3036.32
Getting Started /wp-admin/admin.php?page=atomic-blocks3.38353.97
Migrate /wp-admin/admin.php?page=atomic-blocks-migrate-page3.3033.10

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 256 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Atomic Blocks - Gutenberg Blocks Collection
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲15213.20 ▼1.171.88 ▲0.1442.31 ▼1.70
Dashboard /wp-admin2,293 ▲905.79 ▲0.72112.93 ▲0.7047.13 ▲7.97
Posts /wp-admin/edit.php2,133 ▲332.00 ▼0.0536.11 ▼0.1634.30 ▼0.02
Add New Post /wp-admin/post-new.php6,225 ▲4,68520.33 ▼2.78963.20 ▲274.6555.29 ▼4.81
Media Library /wp-admin/upload.php1,433 ▲364.22 ▲0.0294.68 ▼10.1242.52 ▼4.17
Settings /wp-admin/admin.php?page=atomic-blocks-plugin-settings9442.1826.6772.99
Getting Started /wp-admin/admin.php?page=atomic-blocks2,2872.1524.6758.90
Migrate /wp-admin/admin.php?page=atomic-blocks-migrate-page9012.0124.5744.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% 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 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
  • 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/atomic-blocks/dist/migration/migrate-page/ab-migrate.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/atomic-blocks/src/blocks/block-sharing/index.php:71
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/atomic-blocks/dist/getting-started/pages/settings-general.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/atomic-blocks/dist/getting-started/pages/ab-getting-started.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/atomic-blocks/src/blocks/block-newsletter/index.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function atomic_blocks_is_pro() in wp-content/plugins/atomic-blocks/dist/getting-started/pages/settings-main.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AtomicBlocks\\Layouts\\add_action() in wp-content/plugins/atomic-blocks/includes/layout/layout-endpoints.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/atomic-blocks/src/blocks/block-container/index.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'AtomicBlocks\\Exception\\API_Error_Exception' not found in wp-content/plugins/atomic-blocks/includes/exceptions/class-mailchimp-api-error-exception.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'AtomicBlocks\ewsletter\\Provider_Interface' not found in wp-content/plugins/atomic-blocks/includes/classes/class-mailchimp.php:18

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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: block enabled, page building, editor, page builder, wp engine...

atomic-blocks/atomicblocks.php 92% from 13 tests

The entry point to "Atomic Blocks - Gutenberg Blocks Collection" version 2.9.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("atomic-blocks.php" instead of "atomicblocks.php")

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
Good job! No executable or dangerous file extensions detected29,458 lines of code in 227 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1271,2261,49613,448
CSS172,104505,641
SVG18003,942
Sass3575213,500
PHP296171,1292,911
JSON10016

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity12.11
▷ Minimum class complexity1.00
▷ Maximum class complexity32.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces6
Interfaces1
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes225.00%
Methods48
▷ Static methods714.58%
▷ Public methods3572.92%
▷ Protected methods00.00%
▷ Private methods1327.08%
Functions67
▷ Named functions5074.63%
▷ Anonymous functions1725.37%
Constants15
▷ Global constants00.00%
▷ Class constants15100.00%
▷ Public constants15100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.81MB with 0.39MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/getting-started/images/logo.png12.27KB7.04KB▼ 42.66%
dist/migration/migrate-page/genesis_blocks_hero_Image.png197.18KB76.93KB▼ 60.99%
dist/getting-started/images/geo.png619.70KB72.38KB▼ 88.32%
dist/getting-started/images/genesis-menu.png0.46KB0.49KB0.00%