84% wp-blog-post-layouts

Code Review | WP Blog Post Layouts

WordPress plugin WP Blog Post Layouts scored84%from 54 tests.

About plugin

  • Plugin page: wp-blog-post-layouts
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Apr 22, 2020
  • Latest release: Nov 11, 2022
  • Number of updates: 39
  • Update frequency: every 23.9 days
  • Top authors: codevibrant (100%)

Code review

54 tests

User reviews

67 reviews

Install metrics

10,000+ active /146,128 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.36MB] [CPU: ▼2.43ms] Passed 4 tests

A check of server-side resources used by WP Blog Post Layouts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3644.28 ▲0.30
Dashboard /wp-admin3.65 ▲0.3453.28 ▲1.36
Posts /wp-admin/edit.php3.76 ▲0.4048.49 ▼4.79
Add New Post /wp-admin/post-new.php6.35 ▲0.4698.21 ▼6.58
Media Library /wp-admin/upload.php3.57 ▲0.3438.80 ▲3.02

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 106 new files
Database: no new tables, 9 new options
New WordPress options
wpblog_post_layouts_premium_prefix
widget_theysaidso_widget
db_upgraded
can_compress_scripts
wpblog_post_layouts_activated_time
wpblog_post_layouts_upgrade_premium
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Blog Post Layouts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,970 ▲22413.67 ▼0.6413.55 ▲11.9082.50 ▲38.97
Dashboard /wp-admin2,237 ▲524.88 ▼0.94106.34 ▲2.3338.57 ▼4.80
Posts /wp-admin/edit.php2,121 ▲322.02 ▲0.0135.71 ▼1.0630.62 ▼6.30
Add New Post /wp-admin/post-new.php6,203 ▲4,67019.91 ▼3.29855.16 ▲197.0857.69 ▼4.34
Media Library /wp-admin/upload.php1,422 ▲344.21 ▼0.09100.53 ▼4.6443.25 ▼1.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • wpblog_post_layouts_premium_prefix
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 29× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: postMargin in wp-content/plugins/wp-blog-post-layouts/includes/src/masonry/layout-two/layout-two.php on line 5
    • > PHP Notice
      Undefined variable: postMargin in wp-content/plugins/wp-blog-post-layouts/includes/src/grid/layout-three/layout-three.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-blog-post-layouts/includes/elementor.php:41
    • > PHP Notice
      Undefined variable: postMargin in wp-content/plugins/wp-blog-post-layouts/includes/src/masonry/layout-three/layout-three.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Base_Data_Control' not found in wp-content/plugins/wp-blog-post-layouts/includes/assets/elementor-custom-control/elements-radio-image-control/radio-image.php:6
    • > PHP Notice
      Undefined variable: postMargin in wp-content/plugins/wp-blog-post-layouts/includes/src/grid/layout-two/layout-two.php on line 5
    • > PHP Notice
      Undefined variable: postMargin in wp-content/plugins/wp-blog-post-layouts/includes/src/masonry/layout-one/layout-one.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/wp-blog-post-layouts/includes/src/masonry/element.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/wp-blog-post-layouts/includes/src/grid/element.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-blog-post-layouts/includes/src/grid/layout-three/layout-three.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-blog-post-layouts/wp-blog-post-layouts.php 92% from 13 tests

"WP Blog Post Layouts" version 1.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 214 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin59,034 lines of code in 75 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript344,3595,76823,883
JSON30016,052
SVG40129,078
PHP265385686,150
CSS81,621433,871

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity12.58
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods77
▷ Static methods79.09%
▷ Public methods6989.61%
▷ Protected methods79.09%
▷ Private methods11.30%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
6 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/images/list-layout-three.png0.37KB0.14KB▼ 61.90%
includes/assets/images/list-layout-two.png0.80KB0.57KB▼ 28.38%
includes/assets/images/grid-layout-two.png0.37KB0.16KB▼ 57.56%
includes/assets/images/grid-layout-one.png0.29KB0.11KB▼ 64.12%
includes/assets/images/grid-layout-three.png0.35KB0.13KB▼ 62.54%