84% template-widget-for-beaver-builder

Code Review | Template Widget for Beaver Builder

WordPress plugin Template Widget for Beaver Builder scored84%from 54 tests.

About plugin

  • Plugin page: template-widget-f...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.7.2
  • WordPress version: 6.3.1
  • First release: Jan 9, 2017
  • Latest release: Feb 19, 2017
  • Number of updates: 6
  • Update frequency: every 6.0 days
  • Top authors: ideaboxcreations (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,921 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.28ms] Passed 4 tests

Server-side resources used by Template Widget for Beaver Builder
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.26 ▼5.99
Dashboard /wp-admin3.31 ▼0.0445.39 ▼15.76
Posts /wp-admin/edit.php3.36 ▲0.0043.20 ▼4.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.60 ▼14.96
Media Library /wp-admin/upload.php3.23 ▲0.0033.18 ▼1.81

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Template Widget for Beaver Builder
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.011.60 ▼0.0740.96 ▲1.24
Dashboard /wp-admin2,195 ▲155.58 ▼0.1082.98 ▼4.4337.52 ▼6.58
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.1435.60 ▼2.5137.65 ▲0.41
Add New Post /wp-admin/post-new.php1,526 ▼222.99 ▼0.20663.29 ▲18.5953.44 ▲7.03
Media Library /wp-admin/upload.php1,403 ▲34.19 ▲0.0198.28 ▼13.9744.30 ▼3.35

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/template-widget-for-beaver-builder/classes/class-template-widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: beaver builder, beaver builder widget, beaver addons, template widget, beaver builder template...

template-widget-for-beaver-builder/bb-template-widget.php 85% from 13 tests

This is the main PHP file of "Template Widget for Beaver Builder" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("template-widget-for-beaver-builder.php" instead of "bb-template-widget.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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 plugin185 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22661160
Markdown116025

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity4.80
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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 are no PNG files in this plugin