84% layout-grid

Code Review | Layout Grid Block

WordPress plugin Layout Grid Block scored84%from 54 tests.

About plugin

  • Plugin page: layout-grid
  • Plugin version: 1.8.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: Nov 7, 2019
  • Latest release: Jul 11, 2023
  • Number of updates: 57
  • Update frequency: every 23.5 days
  • Top authors: johnny5 (66.67%)mkaz (19.3%)automattic (12.28%)dsas (7.02%)

Code review

54 tests

User reviews

11 reviews

Install metrics

100,000+ active /142,274 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
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Layout Grid Block
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0346.05 ▲4.79
Dashboard /wp-admin3.32 ▲0.0250.00 ▼2.80
Posts /wp-admin/edit.php3.38 ▲0.0248.39 ▼9.01
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.06 ▼7.79
Media Library /wp-admin/upload.php3.25 ▲0.0236.06 ▲1.25

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Layout Grid Block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.35 ▼0.261.62 ▼0.1245.13 ▲3.26
Dashboard /wp-admin2,192 ▲115.55 ▼0.0884.81 ▼26.6439.09 ▼5.50
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0134.43 ▼0.8036.41 ▼2.07
Add New Post /wp-admin/post-new.php6,195 ▲4,66618.96 ▼4.55950.66 ▲329.4959.04 ▲4.76
Media Library /wp-admin/upload.php1,400 ▼34.16 ▼0.06106.83 ▲1.2644.52 ▲0.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/layout-grid/blocks/layout-grid.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/layout-grid/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: grid, layout, design, blocks, block

layout-grid/index.php 92% from 13 tests

"Layout Grid Block" version 1.8.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("layout-grid.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,540 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS265541,482
PHP3101748
JSON1009
JavaScript1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin