84% container-block

Code Review | Container Block

WordPress plugin Container Block scored84%from 54 tests.

About plugin

  • Plugin page: container-block
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.4.0
  • WordPress version: 6.3.1
  • First release: Dec 30, 2019
  • Latest release: Apr 3, 2020
  • Number of updates: 7
  • Update frequency: every 13.7 days
  • Top authors: mahdiyazdani (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,003 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.56ms] Passed 4 tests

An overview of server-side resources used by Container Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.88 ▲0.60
Dashboard /wp-admin3.31 ▲0.0145.85 ▼6.25
Posts /wp-admin/edit.php3.37 ▲0.0148.58 ▼6.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.79 ▼11.52
Media Library /wp-admin/upload.php3.24 ▲0.0133.85 ▼1.98

Server storage [IO: ▲0.55MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Container Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.171.66 ▲0.0540.60 ▼4.17
Dashboard /wp-admin2,209 ▲214.87 ▼0.15104.49 ▼9.7039.62 ▼6.86
Posts /wp-admin/edit.php2,092 ▼02.06 ▲0.0540.62 ▲0.7735.96 ▲1.62
Add New Post /wp-admin/post-new.php6,243 ▲4,71020.16 ▼2.96903.79 ▲236.9855.32 ▼9.09
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0494.64 ▼16.4841.76 ▼6.37

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

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

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)
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/container-block/container-block.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: container, shape divider, video background, wrapper, gutenberg...

container-block/container-block.php Passed 13 tests

The entry point to "Container Block" version 1.2.0 is a PHP file that has certain tags in its header comment area
97 characters long description:
A fully customizable Gutenberg editor block used for wrapping several blocks in a parent wrapper.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected99 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP54212293
CSS4004
JavaScript2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods8
▷ Static methods112.50%
▷ Public methods675.00%
▷ Protected methods225.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin