83% brave-popup-builder

Code Review | Brave - Create Popup, Optins, Lead Generation, Survey, Sticky Elements & Interactive Content

WordPress plugin Brave - Create Popup, Optins, Lead Generation, Survey, Sticky Elements & Interactive Content scored83%from 54 tests.

About plugin

  • Plugin page: brave-popup-builder
  • Plugin version: 0.6.3
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 30, 2019
  • Latest release: Nov 13, 2023
  • Number of updates: 64
  • Update frequency: every 22.6 days
  • Top authors: getbrave (100%)

Code review

54 tests

User reviews

179 reviews

Install metrics

20,000+ active /280,736 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.71MB] [CPU: ▲9.67ms] Passed 4 tests

A check of server-side resources used by Brave - Create Popup, Optins, Lead Generation, Survey, Sticky Elements & Interactive Content
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /6.22 ▲2.7553.73 ▲15.81
Dashboard /wp-admin6.04 ▲2.7062.44 ▲3.95
Posts /wp-admin/edit.php6.09 ▲2.7370.06 ▲17.65
Add New Post /wp-admin/post-new.php8.71 ▲2.82104.58 ▲1.28
Media Library /wp-admin/upload.php5.91 ▲2.6754.99 ▲20.35
Settings /wp-admin/admin.php?page=bravepop-settings5.9253.79

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 152 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Brave - Create Popup, Optins, Lead Generation, Survey, Sticky Elements & Interactive Content
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲9914.39 ▼0.273.12 ▲1.3237.30 ▲0.52
Dashboard /wp-admin2,254 ▲875.57 ▼0.0693.98 ▼12.4040.77 ▲0.11
Posts /wp-admin/edit.php2,156 ▲561.98 ▲0.0437.56 ▼3.5233.50 ▼6.29
Add New Post /wp-admin/post-new.php1,557 ▲3223.23 ▼0.42692.33 ▲69.9057.02 ▲6.09
Media Library /wp-admin/upload.php1,456 ▲564.22 ▼0.00101.80 ▼2.0243.81 ▼1.46
Settings /wp-admin/admin.php?page=bravepop-settings1,0965.86180.8131.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/brave-popup-builder/lib/helpers/helpers.php:85
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brave-popup-builder/lib/render.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brave-popup-builder/lib/helpers/forms.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brave-popup-builder/lib/enqueue-scripts.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brave-popup-builder/lib/rest/helpers/integrations.php:287
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brave-popup-builder/lib/helpers/metabox.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brave-popup-builder/lib/rest/helpers/integrations.php:287
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brave-popup-builder/lib/helpers/stats.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brave-popup-builder/lib/integration/Uncanny/Uncanny.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/brave-popup-builder/lib/post-type_popup.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: optin, woocommerce popup, wordpress popup, popups, modal...

brave-popup-builder/index.php 85% from 13 tests

The primary PHP file in "Brave - Create Popup, Optins, Lead Generation, Survey, Sticky Elements & Interactive Content" version 0.6.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("brave-popup-builder.php" instead of "index.php")
  • 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

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected15,062 lines of code in 83 files:
LanguageFilesBlank linesComment linesLines of code
PHP691,9516889,873
CSS61,459193,156
JavaScript52771602,004
XML10027
JSON2102

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 126)
Cyclomatic complexity
Average complexity per logical line of code0.86
Average class complexity69.74
▷ Minimum class complexity1.00
▷ Maximum class complexity676.00
Average method complexity13.38
▷ Minimum method complexity1.00
▷ Maximum method complexity126.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes47
▷ Abstract classes00.00%
▷ Concrete classes47100.00%
▷ Final classes00.00%
Methods261
▷ Static methods145.36%
▷ Public methods23790.80%
▷ Protected methods228.43%
▷ Private methods20.77%
Functions81
▷ Named functions8098.77%
▷ Anonymous functions11.23%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
47 compressed PNG files occupy 0.43MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/fflags.png30.79KB29.10KB▼ 5.48%
assets/images/logos/convertkit.png8.77KB3.93KB▼ 55.24%
assets/images/uncanny/integration-brave-icon-64.png0.91KB0.92KB0.00%
assets/images/logos/moosend.png3.93KB4.03KB0.00%
assets/images/posts_layout2.png0.41KB0.40KB▼ 1.44%