90% layoutist

Code Review | Layoutist

WordPress plugin Layoutist scored90%from 54 tests.

About plugin

  • Plugin page: layoutist
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Apr 7, 2020
  • Latest release: Aug 28, 2021
  • Number of updates: 8
  • Update frequency: every 63.6 days
  • Top authors: wpizard (62.5%)technippy (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /496 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.66ms] Passed 4 tests

A check of server-side resources used by Layoutist
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0534.74 ▲0.20
Dashboard /wp-admin3.36 ▲0.0646.34 ▲2.17
Posts /wp-admin/edit.php3.48 ▲0.1244.02 ▲1.15
Add New Post /wp-admin/post-new.php5.97 ▲0.0890.76 ▼12.51
Media Library /wp-admin/upload.php3.29 ▲0.0637.47 ▲0.54

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Layoutist
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4013.28 ▼1.074.05 ▲2.3438.89 ▼2.94
Dashboard /wp-admin2,210 ▲335.62 ▼0.0683.83 ▼6.4539.09 ▼2.87
Posts /wp-admin/edit.php2,112 ▲332.03 ▲0.0437.18 ▼0.0631.32 ▼1.44
Add New Post /wp-admin/post-new.php1,536 ▼123.13 ▼1.88624.29 ▲19.0954.91 ▼43.31
Media Library /wp-admin/upload.php1,406 ▲64.22 ▲0.0395.45 ▼4.4841.32 ▼18.15

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: elementor, block, template

layoutist/plugin.php 92% from 13 tests

The main PHP script in "Layoutist" version 1.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("layoutist.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected11,141 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript101,5102,08710,649
PHP163203315
CSS2330176
SVG1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods1578.95%
▷ Protected methods210.53%
▷ Private methods210.53%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin