10% layout-engine

Code Review | Layout Engine

WordPress plugin Layout Engine scored10%from 54 tests.

About plugin

  • Plugin page: layout-engine
  • Plugin version: 1.0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4.1
  • WordPress version: 6.3.1
  • First release: Aug 13, 2012
  • Latest release: Oct 1, 2012
  • Number of updates: 10
  • Update frequency: every 4.9 days
  • Top authors: simpleux (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,712 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/layout-engine/vendors/lesscss/lessc.inc.php+650
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.28ms] Passed 4 tests

Analyzing server-side resources used by Layout Engine
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.52 ▼2.28
Dashboard /wp-admin3.31 ▲0.0051.76 ▲1.56
Posts /wp-admin/edit.php3.36 ▲0.0048.76 ▼8.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.14 ▼8.20
Media Library /wp-admin/upload.php3.23 ▲0.0037.07 ▲1.72

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Layout Engine
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.031.85 ▲0.1246.31 ▲1.23
Dashboard /wp-admin2,192 ▲125.55 ▼0.1384.23 ▼5.9542.77 ▲0.37
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0037.31 ▼1.3836.83 ▼0.53
Add New Post /wp-admin/post-new.php1,526 ▼023.12 ▼0.42639.76 ▼75.6655.83 ▼1.37
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0496.64 ▼8.5246.89 ▼2.00

Uninstaller [IO: ▲0.00MB] [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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/layout-engine/views/utilities.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/layout-engine/views/theme_layout.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/layout-engine/themes.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/layout-engine/blocks/block.loop.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/layout-engine/layout-engine.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/layout-engine/blocks/block.loop_comments.php:11
    • > PHP Warning
      Declaration of lessify::parse($str = NULL) should be compatible with lessc::parse($str = NULL, $initialVariables = NULL) in wp-content/plugins/layout-engine/vendors/lesscss/lessify.inc.php on line 366
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/layout-engine/blocks/block.shortcode.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/layout-engine/blocks/block.core.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/layout-engine/blocks/block.navigation.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === layout-engine === )
  • Screenshots: These screenshots do not have images: #1 (**Drag and drop** - Drag and drop any element of wordpress.), #2 (**Unlimited sidebars** - Define as many sidebars as you want, remove, re-order or edit them.), #3 (**Simplified widget administration** - Provide one click access to WP Widget administration, delete, replace or define new widget settings or pick any widget at certain position.)
The official readme.txt might help

layout-engine/layout-engine.php 92% from 13 tests

The main PHP file in "Layout Engine" ver. 1.0.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 218 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
No dangerous file extensions were detected6,726 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP211,3541,3855,621
JavaScript219235650
CSS19529435
JSON10020

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity47.57
▷ Minimum class complexity1.00
▷ Maximum class complexity310.00
Average method complexity4.83
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods280
▷ Static methods9032.14%
▷ Public methods15153.93%
▷ Protected methods12946.07%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
4 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png23.00KB22.20KB▼ 3.47%
screenshot-3.png13.63KB12.78KB▼ 6.24%
assets/icons/drag.png1.06KB0.18KB▼ 82.90%
screenshot-2.png7.05KB6.12KB▼ 13.25%