78% ninja-beaver-lite-addons-for-beaver-builder

Code Review | Ninja Beaver Add-ons for Beaver Builder

WordPress plugin Ninja Beaver Add-ons for Beaver Builder scored78%from 54 tests.

About plugin

  • Plugin page: ninja-beaver-lite...
  • Plugin version: 2.4.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Jun 3, 2017
  • Latest release: May 3, 2022
  • Number of updates: 54
  • Update frequency: every 33.3 days
  • Top authors: njba (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

3,000+ active /46,529 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
Installer ran successfully

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

An overview of server-side resources used by Ninja Beaver Add-ons for Beaver Builder
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.49 ▲2.81
Dashboard /wp-admin3.31 ▲0.0046.65 ▼8.30
Posts /wp-admin/edit.php3.36 ▲0.0044.20 ▼4.58
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.33 ▼16.31
Media Library /wp-admin/upload.php3.23 ▲0.0037.99 ▲3.04

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 333 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ninja Beaver Add-ons for Beaver Builder
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲614.34 ▲0.051.75 ▼0.5843.26 ▼3.05
Dashboard /wp-admin2,195 ▲155.60 ▲0.0484.84 ▼12.7140.14 ▼4.83
Posts /wp-admin/edit.php2,097 ▼02.01 ▼0.0134.23 ▼5.1233.43 ▼4.59
Add New Post /wp-admin/post-new.php1,526 ▼022.91 ▼0.48678.72 ▲25.9448.94 ▼10.82
Media Library /wp-admin/upload.php1,403 ▲34.29 ▲0.0798.81 ▼9.1247.12 ▲4.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Please fix the following items
  • 42× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-twitter-tweet/includes/frontend.js.php
    • > /wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-flip-box/includes/frontend.js.php
    • > /wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-button/includes/frontend.php
    • > /wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-gallery/includes/frontend.js.php
    • > /wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-facebook-embed/includes/frontend.php
    • > /wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-img-separator/includes/frontend.js.php
    • > /wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-quote-box/includes/frontend.php
    • > /wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-accordion/includes/frontend.php
    • > /wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-twitter-timeline/includes/frontend.php
    • > /wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-tabs/includes/frontend.js.php
  • 1307× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: total_box_content in wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-price-box/includes/layout_3.php on line 2
    • > PHP Notice
      Undefined property: stdClass::$btn_hover_border_color in wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-contact-form/includes/frontend.css.php on line 41
    • > PHP Notice
      Undefined property: stdClass::$img_icon_bg_color_opc in wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-icon-img/includes/frontend.css.php on line 29
    • > PHP Notice
      Trying to get property 'quotebox_layout' of non-object in wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-quote-box/includes/frontend.php on line 4
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-spacer/includes/frontend.css.php on line 6
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-image-panels/includes/frontend.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-alert-box/includes/frontend.css.php on line 21
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-testimonials/includes/frontend.css.php on line 43
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-alert-box/includes/frontend.css.php on line 22
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/ninja-beaver-lite-addons-for-beaver-builder/modules/njba-img-separator/includes/frontend.css.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: beaver builder free, beaver addons, beaver builder add ons, beaver builder addon, ninja beaver addon...

ninja-beaver-lite-addons-for-beaver-builder/bb-njba-lite.php 85% from 13 tests

The main PHP file in "Ninja Beaver Add-ons for Beaver Builder" ver. 2.4.5 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("ninja-beaver-lite-addons-for-beaver-builder.php" instead of "bb-njba-lite.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin51,061 lines of code in 260 files:
LanguageFilesBlank linesComment linesLines of code
PHP1781,6921,75340,114
CSS451,0651015,619
JavaScript241249703,163
PO File11,0334,2312,081
SVG120084

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity9.39
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes62
▷ Abstract classes00.00%
▷ Concrete classes62100.00%
▷ Final classes00.00%
Methods257
▷ Static methods124.67%
▷ Public methods22286.38%
▷ Protected methods3212.45%
▷ Private methods31.17%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
25 PNG files occupy 0.12MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
classes/admin/purchase/icons/njba-timeline-icon.png5.49KB0.38KB▼ 93.07%
classes/admin/purchase/icons/njba-polaroid-options-icon.png7.53KB0.51KB▼ 93.28%
classes/admin/purchase/icons/njba-advanced-tabs-icon.png6.11KB0.97KB▼ 84.11%
classes/admin/purchase/icons/njba-static-map-icon.png3.08KB0.30KB▼ 90.21%
classes/admin/purchase/icons/njba-column-separator-icon.png5.05KB0.35KB▼ 93.08%