99% woo-blocks

Code Review | Awesome blocks for WooCommerce

WordPress plugin Awesome blocks for WooCommerce scored 99% from 54 tests.

About plugin

  • Plugin page: woo-blocks
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2
  • WordPress version: 5.9.2
  • First release: Oct 7, 2019
  • Latest release: Oct 7, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: jmsthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 443 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼290.45ms] Passed 4 tests

A check of server-side resources used by Awesome blocks for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0156.99 ▲4.37
Dashboard /wp-admin3.44 ▲0.0033.51 ▼0.96
Posts /wp-admin/edit.php3.68 ▲0.0036.74 ▼0.87
Add New Post /wp-admin/post-new.php6.91 ▼0.0991.70 ▼1,163.52
Media Library /wp-admin/upload.php3.33 ▲0.0030.63 ▲3.55

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 51 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Awesome blocks for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5316.18 ▲0.606.16 ▲0.432.55 ▲0.49
Dashboard /wp-admin2,889 ▲356.13 ▼0.16127.46 ▼7.49158.20 ▼3.42
Posts /wp-admin/edit.php2,691 ▲63.23 ▼0.0062.18 ▼0.78141.24 ▲1.49
Add New Post /wp-admin/post-new.php1,672 ▼3922.29 ▲1.19411.66 ▼41.44161.85 ▲5.45
Media Library /wp-admin/upload.php1,694 ▼45.47 ▼0.06158.46 ▲5.07192.30 ▼6.70

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5, #6, #7, #8 in woo-blocks/assets to your readme.txt
You can take inspiration from this readme.txt

woo-blocks/jms-wooblocks.php 85% from 13 tests

Analyzing the main PHP file in "Awesome blocks for WooCommerce" version 1.0.0
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-blocks.php" instead of "jms-wooblocks.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin915 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP20176356877
JavaScript1366123
JSON60012
CSS2003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
Methods45
▷ Static methods817.78%
▷ Public methods3884.44%
▷ Protected methods613.33%
▷ Private methods12.22%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants7
▷ Global constants7100.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
There were not PNG files found in your plugin