78% creative-blocks

Code Review | Creative Blocks - Ultimate Blocks for Gutenberg

WordPress plugin Creative Blocks - Ultimate Blocks for Gutenberg scored78%from 54 tests.

About plugin

  • Plugin page: creative-blocks
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 28, 2019
  • Latest release: Jul 22, 2020
  • Number of updates: 4
  • Update frequency: every 90.5 days
  • Top authors: keonthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /29,643 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼13.88ms] Passed 4 tests

A check of server-side resources used by Creative Blocks - Ultimate Blocks for Gutenberg
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3641.30 ▼1.20
Dashboard /wp-admin3.67 ▲0.3355.10 ▼13.74
Posts /wp-admin/edit.php3.72 ▲0.3752.35 ▼0.70
Add New Post /wp-admin/post-new.php5.19 ▼0.7058.89 ▼39.89
Media Library /wp-admin/upload.php3.53 ▲0.3041.55 ▲6.67

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 59 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
__cb_do_redirect
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Creative Blocks - Ultimate Blocks for Gutenberg
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,002 ▲24113.82 ▼0.808.72 ▲6.6536.96 ▼4.28
Dashboard /wp-admin2,291 ▲1205.65 ▲0.04101.93 ▲0.2841.37 ▼0.74
Posts /wp-admin/edit.php2,197 ▲972.00 ▼0.0340.33 ▲4.0436.33 ▲3.76
Add New Post /wp-admin/post-new.php1,725 ▲19929.01 ▲5.46702.68 ▲10.3837.52 ▼32.57
Media Library /wp-admin/upload.php1,493 ▲934.19 ▼0.14100.16 ▼14.9442.41 ▼7.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • __cb_do_redirect
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 10× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/creative-blocks/templates/svg/post-masonry.php
    • > /wp-content/plugins/creative-blocks/templates/svg/spacer.php
    • > /wp-content/plugins/creative-blocks/templates/svg/profile-box.php
    • > /wp-content/plugins/creative-blocks/templates/svg/accordion.php
    • > /wp-content/plugins/creative-blocks/templates/svg/heading.php
    • > /wp-content/plugins/creative-blocks/templates/svg/icon-box.php
    • > /wp-content/plugins/creative-blocks/templates/svg/post-slider.php
    • > /wp-content/plugins/creative-blocks/templates/svg/callback.php
    • > /wp-content/plugins/creative-blocks/templates/svg/divider.php
    • > /wp-content/plugins/creative-blocks/templates/svg/section.php
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'CB_Helper' not found in wp-content/plugins/creative-blocks/classes/class-base.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CB_Helper' not found in wp-content/plugins/creative-blocks/classes/class-admin.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CB_Base' not found in wp-content/plugins/creative-blocks/classes/class-section-column.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CB_Base' not found in wp-content/plugins/creative-blocks/classes/class-post-slider.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CB_Helper' not found in wp-content/plugins/creative-blocks/classes/class-init.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CB_Base' not found in wp-content/plugins/creative-blocks/classes/class-profile-box.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CB_Base' not found in wp-content/plugins/creative-blocks/classes/class-accordion.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CB_Base' not found in wp-content/plugins/creative-blocks/classes/class-post-masonry.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CB_Base' not found in wp-content/plugins/creative-blocks/classes/class-callback.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CB_Admin' not found in wp-content/plugins/creative-blocks/templates/admin-page.php:1

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 93% 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
8 plugin tags: gutenberg blocks, block, gutenberg block, creative block, gutenberg...

creative-blocks/plugin.php 85% from 13 tests

The principal PHP file in "Creative Blocks - Ultimate Blocks for Gutenberg" v. 1.0.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("creative-blocks.php" instead of "plugin.php")
  • Description: The description should be shorter than 140 characters (currently 295 characters long)

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
Everything looks great! No dangerous files found in this plugin17,536 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
CSS81,612675,378
JavaScript71,5261145,146
SVG41124,495
PHP223086242,517

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity15.91
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes110.00%
Methods72
▷ Static methods4156.94%
▷ Public methods6387.50%
▷ Protected methods912.50%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
vendors/nicescroll/zoomico.png0.25KB0.25KB0.00%