10% site-layout-customizer

Code Review | Site Layout Customizer

WordPress plugin Site Layout Customizer scored 10% from 54 tests.

About plugin

  • Plugin page: site-layout-custo...
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-3.6.1
  • WordPress version: 5.9.2
  • First release: Feb 21, 2012
  • Latest release: Oct 12, 2013
  • Number of updates: 168
  • Update frequency: every 3.6 days
  • Top authors: wpcolor (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

700+ active / 60,415 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/site-layout-customizer/sitelayoutcustomizer.php+123
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼2.53MB] [CPU: ▼353.80ms] Passed 4 tests

Analyzing server-side resources used by Site Layout Customizer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.84 ▼1.689.55 ▼56.92
Dashboard /wp-admin1.86 ▼1.558.89 ▼30.66
Posts /wp-admin/edit.php1.86 ▼1.788.40 ▼53.05
Add New Post /wp-admin/post-new.php1.86 ▼5.118.71 ▼1,274.56
Media Library /wp-admin/upload.php1.86 ▼1.449.17 ▼13.26

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Site Layout Customizer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,788 ▲4615.73 ▲0.416.53 ▲0.262.15 ▼0.23
Dashboard /wp-admin2,914 ▲576.15 ▼0.12121.75 ▼1.54159.02 ▼21.17
Posts /wp-admin/edit.php2,713 ▲223.24 ▼0.0189.29 ▲24.85143.62 ▼1.52
Add New Post /wp-admin/post-new.php1,726 ▲6521.32 ▲5.09474.24 ▲65.61182.81 ▼18.31
Media Library /wp-admin/upload.php1,720 ▲285.46 ▼0.06144.47 ▼17.04193.97 ▼35.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5768
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the slc-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/site-layout-customizer/sitelayoutcustomizer.php:59

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
These attributes need to be fixed:
  • Tags: You are using too many tags: 20 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (example), #2 (example)
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

site-layout-customizer/sitelayoutcustomizer.php 92% from 13 tests

The entry point to "Site Layout Customizer" version 1.8 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("site-layout-customizer.php" instead of "sitelayoutcustomizer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,638 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1382411,203
CSS19717435

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions76
▷ Named functions76100.00%
▷ Anonymous functions00.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png16.43KB5.41KB▼ 67.07%