79% custom-layouts

Code Review | Custom Layouts - Post + Product grids made easy

WordPress plugin Custom Layouts - Post + Product grids made easy scored79%from 54 tests.

About plugin

  • Plugin page: custom-layouts
  • Plugin version: 1.4.10
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4
  • WordPress version: 6.3.1
  • First release: Jan 9, 2021
  • Latest release: Nov 9, 2023
  • Number of updates: 86
  • Update frequency: every 12.3 days
  • Top authors: codeamp (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

5,000+ active /41,787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.35MB] [CPU: ▲5.41ms] Passed 4 tests

This is a short check of server-side resources used by Custom Layouts - Post + Product grids made easy
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.87 ▲1.4044.52 ▲3.83
Dashboard /wp-admin4.69 ▲1.3467.89 ▲5.00
Posts /wp-admin/edit.php4.75 ▲1.3855.71 ▲6.12
Add New Post /wp-admin/post-new.php7.23 ▲1.34112.32 ▲17.72
Media Library /wp-admin/upload.php4.55 ▲1.3242.88 ▲6.69
Layouts /wp-admin/edit.php?post_type=cl-layout4.6642.22
Settings /wp-admin/admin.php?page=custom-layouts-settings5.9644.91
Templates /wp-admin/edit.php?post_type=cl-template4.6646.31

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 139 new files
Database: no new tables, 9 new options
New WordPress options
custom_layouts_version
widget_recent-posts
custom_layouts_transient_keys
custom_layouts_transient_query_keys
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Custom Layouts - Post + Product grids made easy: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,871 ▲10914.35 ▲0.052.80 ▲1.1438.44 ▼5.09
Dashboard /wp-admin2,266 ▲865.55 ▼0.0890.17 ▲1.8838.20 ▼3.62
Posts /wp-admin/edit.php2,167 ▲672.03 ▲0.0140.77 ▲5.9935.61 ▲0.68
Add New Post /wp-admin/post-new.php6,420 ▲4,89330.24 ▲6.88911.13 ▲307.3936.45 ▼24.04
Media Library /wp-admin/upload.php1,470 ▲764.18 ▼0.0398.54 ▼2.9140.88 ▼2.16
Layouts /wp-admin/edit.php?post_type=cl-layout1,1481.9036.6130.68
Settings /wp-admin/admin.php?page=custom-layouts-settings1,15513.41261.4530.42
Templates /wp-admin/edit.php?post_type=cl-template1,1401.9230.4530.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 9 options
    • theysaidso_admin_options
    • custom_layouts_version
    • custom_layouts_transient_keys
    • can_compress_scripts
    • custom_layouts_transient_query_keys
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% 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 0% 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/custom-layouts/includes/admin/settings-page.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Custom_Layouts\\Upgrade\\v1_4_2\\add_action() in wp-content/plugins/custom-layouts/includes/upgrade/1.4.2.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Custom_Layouts\\Upgrade\\v1_4_8\\add_action() in wp-content/plugins/custom-layouts/includes/upgrade/1.4.8.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Custom_Layouts\\Upgrade\\v1_3_0\\add_action() in wp-content/plugins/custom-layouts/includes/upgrade/1.3.0.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Custom_Layouts\\Upgrade\\v1_4_0\\add_action() in wp-content/plugins/custom-layouts/includes/upgrade/1.4.0.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Custom_Layouts\\Upgrade\\v1_4_3\\add_action() in wp-content/plugins/custom-layouts/includes/upgrade/1.4.3.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Custom_Layouts\\Upgrade\\v1_4_1\\add_action() in wp-content/plugins/custom-layouts/includes/upgrade/1.4.1.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: block, product grid, post grid, recent posts, products...

custom-layouts/custom-layouts.php Passed 13 tests

"Custom Layouts - Post + Product grids made easy" version 1.4.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
139 characters long description:
Build a list or grid layout of any post type. Design the look of each item in the layout using our powerful drag and drop template editor.

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
No dangerous file extensions were detected8,546 lines of code in 112 files:
LanguageFilesBlank linesComment linesLines of code
PHP671,6512,4046,840
SVG33001,141
XML2812355
JSON220203
JavaScript5045
CSS3302

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity17.93
▷ Minimum class complexity1.00
▷ Maximum class complexity142.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces14
Interfaces0
Traits0
Classes46
▷ Abstract classes00.00%
▷ Concrete classes46100.00%
▷ Final classes00.00%
Methods341
▷ Static methods14743.11%
▷ Public methods27179.47%
▷ Protected methods195.57%
▷ Private methods5114.96%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants660.00%
▷ Class constants440.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin