93% lbk-elements-for-flatsome

Code Review | LBK Elements for Flatsome

WordPress plugin LBK Elements for Flatsome scored 93% from 54 tests.

About plugin

  • Plugin page: lbk-elements-for-...
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-5.7
  • WordPress version: 5.8.1
  • First release: Apr 7, 2021
  • Latest release: Jul 21, 2021
  • Number of updates: 6
  • Update frequency: every 18.3 days
  • Top authors: sheensilver (66.67%)serviceslbk (50%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 320 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼145.69ms] Passed 4 tests

An overview of server-side resources used by LBK Elements for Flatsome
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0023.92 ▼0.45
Dashboard /wp-admin3.07 ▲0.0132.45 ▼4.62
Posts /wp-admin/edit.php3.12 ▲0.0130.36 ▲0.23
Add New Post /wp-admin/post-new.php5.43 ▼0.0170.02 ▼577.92
Media Library /wp-admin/upload.php3.01 ▲0.0124.07 ▲2.39

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for LBK Elements for Flatsome
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,681 ▲3015.98 ▲0.306.55 ▲1.0876.05 ▲1.11
Dashboard /wp-admin2,944 ▲486.12 ▼0.04114.76 ▼19.82169.81 ▼1.24
Posts /wp-admin/edit.php2,755 ▲123.24 ▼0.0072.02 ▲7.32151.25 ▲13.84
Add New Post /wp-admin/post-new.php3,745 ▲4118.72 ▼0.14428.37 ▼25.12155.97 ▼15.32
Media Library /wp-admin/upload.php1,767 ▲185.50 ▼0.02147.27 ▼3.76181.68 ▼10.03

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/lbk-elements-for-flatsome/includes/templates/lbk_progess_line.php
    • > /wp-content/plugins/lbk-elements-for-flatsome/lbk-flatsome-elements.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 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
2 plugin tags: flatsome-element, lbk

lbk-elements-for-flatsome/lbk-flatsome-elements.php 69% from 13 tests

Analyzing the main PHP file in "LBK Elements for Flatsome" version 1.1.2
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lbk-elements-for-flatsome.php" instead of "lbk-flatsome-elements.php")
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist
  • Requires at least: Required version must be the same as the one declared in readme.txt ("1.0" instead of "1.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,270 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP81592411,270

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity3.00
▷ Minimum class complexity2.00
▷ Maximum class complexity4.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes2100.00%
Methods16
▷ Static methods637.50%
▷ Public methods1275.00%
▷ Protected methods00.00%
▷ Private methods425.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected