10% power-blocks

Code Review | Power Blocks - Powerful and Feature Rich Blocks for Gutenberg

WordPress plugin Power Blocks - Powerful and Feature Rich Blocks for Gutenberg scored10%from 54 tests.

About plugin

  • Plugin page: power-blocks
  • Plugin version: 0.1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Dec 30, 2018
  • Latest release: Mar 14, 2020
  • Number of updates: 6
  • Update frequency: every 73.7 days
  • Top authors: tareq1988 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,626 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/power-blocks/power-blocks.php+129
    Use of undefined constant PowerBlocks_VERSION - assumed 'PowerBlocks_VERSION' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼0.25MB] [CPU: ▼14.58ms] Passed 4 tests

Server-side resources used by Power Blocks - Powerful and Feature Rich Blocks for Gutenberg
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.90 ▼4.78
Dashboard /wp-admin3.34 ▲0.0346.24 ▼14.39
Posts /wp-admin/edit.php3.39 ▲0.0349.53 ▲3.78
Add New Post /wp-admin/post-new.php4.83 ▼1.0655.06 ▼36.92
Media Library /wp-admin/upload.php3.26 ▲0.0334.81 ▼2.23

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
powerblocks_version
powerblocks_installed
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Power Blocks - Powerful and Feature Rich Blocks for Gutenberg: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7514.80 ▲0.641.92 ▲0.3143.34 ▼1.36
Dashboard /wp-admin2,206 ▲215.81 ▼0.05115.40 ▼11.2546.59 ▼10.09
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0436.87 ▼3.8239.22 ▲2.89
Add New Post /wp-admin/post-new.php6,182 ▲4,66226.19 ▲3.09896.05 ▲211.4765.18 ▲6.38
Media Library /wp-admin/upload.php1,388 ▼04.10 ▼0.19100.25 ▼4.8444.48 ▼0.29

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 8 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • powerblocks_version
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • powerblocks_installed
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (Callout box) image required
The official readme.txt is a good inspiration

power-blocks/power-blocks.php Passed 13 tests

The main file in "Power Blocks - Powerful and Feature Rich Blocks for Gutenberg" v. 0.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
68 characters long description:
Powerful and feature rich blocks for the WordPress Gutenberg editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected222 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP23211293
JavaScript3134884
Sass27144
CSS1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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