84% layouts-for-wpbakery

Code Review | Layouts for WPBakery

WordPress plugin Layouts for WPBakery scored84%from 54 tests.

About plugin

  • Plugin page: layouts-for-wpbakery
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 13, 2019
  • Latest release: Oct 5, 2023
  • Number of updates: 11
  • Update frequency: every 134.8 days
  • Top authors: giraphix (63.64%)techeshta (45.45%)

Code review

54 tests

User reviews

8 reviews

Install metrics

3,000+ active /28,140 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.10MB] [CPU: ▼3.99ms] Passed 4 tests

Server-side resources used by Layouts for WPBakery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1034.23 ▼3.45
Dashboard /wp-admin3.41 ▲0.1043.26 ▼7.14
Posts /wp-admin/edit.php3.52 ▲0.1647.51 ▲0.10
Add New Post /wp-admin/post-new.php6.01 ▲0.1281.15 ▼5.46
Media Library /wp-admin/upload.php3.33 ▲0.1034.47 ▲0.51

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Layouts for WPBakery: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲1314.39 ▲0.041.63 ▼0.2239.98 ▼0.83
Dashboard /wp-admin2,202 ▲285.56 ▼0.0082.72 ▼5.7637.47 ▼1.89
Posts /wp-admin/edit.php2,107 ▲42.10 ▲0.1236.16 ▼5.0534.17 ▼3.02
Add New Post /wp-admin/post-new.php1,536 ▼1123.31 ▼1.36669.60 ▲42.3951.91 ▼14.36
Media Library /wp-admin/upload.php1,410 ▲104.23 ▲0.0498.09 ▲3.4041.78 ▼1.86

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% 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 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
Please take a closer look at the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/layouts-for-wpbakery/includes/class-layout-importer.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/layouts-for-wpbakery/includes/layouts.php:3
    • > PHP Warning
      include(): Failed opening 'ABSPATHwp-admin/includes/image.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/layouts-for-wpbakery/includes/class-layout-importer.php on line 17
    • > PHP Warning
      include(ABSPATHwp-admin/includes/image.php): failed to open stream: No such file or directory in wp-content/plugins/layouts-for-wpbakery/includes/class-layout-importer.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/layouts-for-wpbakery/includes/class-layout-importer.php:26

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: readymade templates layout, wpbakery layouts module, wpbakery layout templates, free wpbakery layouts, wpbakery layouts...

layouts-for-wpbakery/layouts-for-wpbakery.php Passed 13 tests

"Layouts for WPBakery" version 1.0.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
84 characters long description:
Beautifully designed, Free templates, Handcrafted for popular WPBakery page builder.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,715 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS22411752
PHP4120153555
JavaScript26973408

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity23.67
▷ Minimum class complexity13.00
▷ Maximum class complexity35.00
Average method complexity3.52
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods13.57%
▷ Public methods2278.57%
▷ Protected methods00.00%
▷ Private methods621.43%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants450.00%
▷ Class constants450.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/layouts-for-wpbakery.png1.14KB0.42KB▼ 62.97%
assets/images/lfw-logo.png5.21KB2.49KB▼ 52.23%