84% asl-blocks

Code Review | Custom Content Blocks

WordPress plugin Custom Content Blocks scored84%from 54 tests.

About plugin

  • Plugin page: asl-blocks
  • Plugin version: 0.2.08
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.0.2
  • WordPress version: 6.3.1
  • First release: Jul 26, 2021
  • Latest release: Jan 25, 2023
  • Number of updates: 62
  • Update frequency: every 8.9 days
  • Top authors: alexlundin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,315 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▲1.04ms] Passed 4 tests

This is a short check of server-side resources used by Custom Content Blocks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1444.96 ▲2.21
Dashboard /wp-admin3.40 ▲0.0947.15 ▲4.30
Posts /wp-admin/edit.php3.45 ▲0.0950.75 ▲2.91
Add New Post /wp-admin/post-new.php6.25 ▲0.3798.81 ▼1.40
Media Library /wp-admin/upload.php3.32 ▲0.0938.28 ▲0.42

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 67 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Content Blocks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.17 ▼0.191.79 ▼0.1542.96 ▼0.96
Dashboard /wp-admin2,195 ▲155.64 ▲0.0394.62 ▲5.5437.72 ▼4.56
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0742.12 ▼0.0836.58 ▼3.80
Add New Post /wp-admin/post-new.php6,246 ▲4,72019.19 ▼4.46994.40 ▲342.2238.50 ▼26.05
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.05102.36 ▼2.9446.56 ▲1.76

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • 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 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/asl-blocks/blocks/cta-2/cta-2.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/asl-blocks/blocks/product/product.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/asl-blocks/blocks/advanced-button/advanced-button.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/asl-blocks/blocks/product-table/product-table.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/asl-blocks/blocks/text-block/text-block.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/asl-blocks/blocks/advanced-buttons/advanced-buttons.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/asl-blocks/blocks/cta-1/cta-1.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/asl-blocks/blocks/asl-advantage-table/asl-advantage-table.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/asl-blocks/blocks/product-row/product-row.php:12

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 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
4 plugin tags: gutenberg blocks, gutenberg, blocks editor, block

asl-blocks/asl-blocks.php 92% from 13 tests

Analyzing the main PHP file in "Custom Content Blocks" version 0.2.08
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "5.7")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected2,546 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript131512122,086
JSON900190
PHP203168187
CSS208071
PO File10212

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions1578.95%
▷ Anonymous functions421.05%
Constants0
▷ Global constants00.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
No PNG files were detected