78% woo-layout-editor

Code Review | Woo Layout Editor

WordPress plugin Woo Layout Editor scored78%from 54 tests.

About plugin

  • Plugin page: woo-layout-editor
  • Plugin version: 1.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.7.1
  • WordPress version: 6.3.1
  • First release: Oct 17, 2016
  • Latest release: Jan 20, 2017
  • Number of updates: 45
  • Update frequency: every 2.1 days
  • Top authors: triplebit2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,538 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.48MB] [CPU: ▼4.29ms] Passed 4 tests

Analyzing server-side resources used by Woo Layout Editor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5445.41 ▲3.43
Dashboard /wp-admin3.82 ▲0.5153.05 ▼1.77
Posts /wp-admin/edit.php3.87 ▲0.5153.84 ▼1.52
Add New Post /wp-admin/post-new.php6.34 ▲0.45102.04 ▼17.30
Media Library /wp-admin/upload.php3.68 ▲0.4543.81 ▲8.45
Layout Editor /wp-admin/admin.php?page=my-custom-submenu-page3.6540.25

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 52 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
woolayedtil_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo Layout Editor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.31 ▼0.041.72 ▼0.3938.82 ▼2.05
Dashboard /wp-admin2,192 ▲155.65 ▲0.0191.56 ▼4.9141.92 ▲2.21
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0338.38 ▼3.8136.03 ▲1.53
Add New Post /wp-admin/post-new.php1,525 ▼2321.87 ▲3.47640.45 ▲13.0963.07 ▼4.86
Media Library /wp-admin/upload.php1,397 ▼34.23 ▲0.0194.98 ▼12.3741.18 ▼7.08
Layout Editor /wp-admin/admin.php?page=my-custom-submenu-page1,8293.1864.9644.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

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 | 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-layout-editor/woo-product-editor.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-layout-editor/shop_layout.php:75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-layout-editor/shop_products_layout.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-layout-editor/product_layout.php:71

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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:
  • Screenshots: Screenshot #1 (Woo Layout Editor in action) image not found
Please take inspiration from this readme.txt

woo-layout-editor/woo-product-editor.php 85% from 13 tests

The main PHP script in "Woo Layout Editor" version 1.5.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-layout-editor.php" instead of "woo-product-editor.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
Good job! No executable or dangerous file extensions detected13,460 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS341262,624
PHP64605702,405
JavaScript53803952,234
Sass1434341,768
LESS1434441,758

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity163.50
▷ Minimum class complexity130.00
▷ Maximum class complexity197.00
Average method complexity4.82
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods85
▷ Static methods11.18%
▷ Public methods6981.18%
▷ Protected methods1618.82%
▷ Private methods00.00%
Functions54
▷ Named functions54100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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
There were not PNG files found in your plugin