83% wp-layouts

Code Review | WP Layouts

WordPress plugin WP Layouts scored83%from 54 tests.

About plugin

  • Plugin page: wp-layouts
  • Plugin version: 0.6.21
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: May 29, 2020
  • Latest release: Oct 16, 2023
  • Number of updates: 39
  • Update frequency: every 31.7 days
  • Top authors: aspengrovestudios (56.41%)annaqq (46.15%)

Code review

54 tests

User reviews

5 reviews

Install metrics

5,000+ active /59,290 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.00MB] [CPU: ▼12.30ms] Passed 4 tests

An overview of server-side resources used by WP Layouts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2538.45 ▼2.26
Dashboard /wp-admin3.64 ▲0.2948.12 ▼14.10
Posts /wp-admin/edit.php3.69 ▲0.3351.23 ▲4.00
Add New Post /wp-admin/post-new.php5.08 ▼0.8159.70 ▼36.83
Media Library /wp-admin/upload.php3.50 ▲0.2640.17 ▲5.86
Settings /wp-admin/admin.php?page=ags-layouts-settings3.5134.71
WP Layouts /wp-admin/admin.php?page=ags-layouts3.4833.34

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Layouts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲8014.62 ▲0.271.69 ▲0.1235.96 ▼4.36
Dashboard /wp-admin2,247 ▲725.32 ▼0.33100.99 ▲1.8440.12 ▼2.13
Posts /wp-admin/edit.php2,131 ▲312.65 ▲0.6540.52 ▲5.1934.10 ▼1.74
Add New Post /wp-admin/post-new.php1,822 ▲29626.70 ▲3.67734.01 ▲8.1341.32 ▼16.01
Media Library /wp-admin/upload.php1,459 ▲654.75 ▲0.57107.05 ▲12.7950.31 ▲5.73
Settings /wp-admin/admin.php?page=ags-layouts-settings9822.3726.7178.67
WP Layouts /wp-admin/admin.php?page=ags-layouts1,5052.9272.9671.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 31× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'AGSLayouts' not found in wp-content/plugins/wp-layouts/includes/api.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'AGSLayouts' not found in wp-content/plugins/wp-layouts/integrations/Gutenberg/Gutenberg.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'AGSLayouts' not found in wp-content/plugins/wp-layouts/includes/account.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'AGSLayouts' not found in wp-content/plugins/wp-layouts/includes/exceptions/ApiTokenException.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'AGSLayouts' not found in wp-content/plugins/wp-layouts/includes/list.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/import.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-layouts/includes/site-import/wordpress-importer.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'AGSLayouts' not found in wp-content/plugins/wp-layouts/includes/packager.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'AGSLayouts' not found in wp-content/plugins/wp-layouts/includes/delete.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'AGSLayouts' not found in wp-content/plugins/wp-layouts/includes/update.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'AGSLayouts' not found in wp-content/plugins/wp-layouts/includes/export-ajax.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-layouts/ags-layouts.php 85% from 13 tests

The main PHP file in "WP Layouts" ver. 0.6.21 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-layouts.php" instead of "ags-layouts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin10,497 lines of code in 72 files:
LanguageFilesBlank linesComment linesLines of code
PHP341,2356595,123
JavaScript114724253,000
CSS35261762,094
SVG24113280

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity41.04
▷ Minimum class complexity1.00
▷ Maximum class complexity205.00
Average method complexity6.28
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods175
▷ Static methods12370.29%
▷ Public methods17197.71%
▷ Protected methods10.57%
▷ Private methods31.71%
Functions12
▷ Named functions433.33%
▷ Anonymous functions866.67%
Constants12
▷ Global constants325.00%
▷ Class constants975.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/datatables/images/sort_desc.png1.52KB0.25KB▼ 83.88%
vendor/datatables/images/sort_both.png0.20KB0.29KB0.00%
vendor/datatables/images/sort_asc.png1.51KB0.25KB▼ 83.68%
vendor/datatables/images/sort_desc_disabled.png0.14KB0.25KB0.00%
vendor/datatables/images/sort_asc_disabled.png0.14KB0.25KB0.00%