77% branda-white-labeling

Code Review | Branda – White Label WordPress, Custom Login Page Customizer

WordPress plugin Branda – White Label WordPress, Custom Login Page Customizer scored77%from 54 tests.

About plugin

  • Plugin page: branda-white-labe...
  • Plugin version: 3.4.13
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2020
  • Latest release: Oct 12, 2023
  • Number of updates: 43
  • Update frequency: every 29.6 days
  • Top authors: panoslyrakis (48.84%)khaxan (37.21%)WPMUDEV (11.63%)vanyukov (6.98%)rickjc89 (4.65%)

Code review

54 tests

User reviews

27 reviews

Install metrics

20,000+ active /230,146 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.66MB] [CPU: ▲5.65ms] Passed 4 tests

A check of server-side resources used by Branda – White Label WordPress, Custom Login Page Customizer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.60 ▲1.1441.93 ▲2.36
Dashboard /wp-admin5.18 ▲1.8857.18 ▲7.05
Posts /wp-admin/edit.php5.23 ▲1.8755.63 ▲8.15
Add New Post /wp-admin/post-new.php7.70 ▲1.8194.33 ▲5.03
Media Library /wp-admin/upload.php5.04 ▲1.8151.02 ▲17.47
Admin Area /wp-admin/admin.php?page=branding_group_admin5.0949.23
Utilities /wp-admin/admin.php?page=branding_group_utilities5.0845.08
Branda Pro /wp-admin/admin.php?page=branda_pro5.0744.22
Emails /wp-admin/admin.php?page=branding_group_emails5.0845.27
Widgets /wp-admin/admin.php?page=branding_group_widgets5.0843.42
Front-end /wp-admin/admin.php?page=branding_group_front-end5.0944.62
Dashboard /wp-admin/admin.php?page=branding5.1648.28
Settings /wp-admin/admin.php?page=branding_group_data5.1357.62

Server storage [IO: ▲18.36MB] [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: 1,332 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-comments
widget_recent-posts
branda_db_version
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
ub_permissions_users
branda_first_installed_version
ub_version
can_compress_scripts
...

Browser metrics Passed 4 tests

Branda – White Label WordPress, Custom Login Page Customizer: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,858 ▲9714.36 ▼0.231.66 ▼0.0938.44 ▼6.50
Dashboard /wp-admin2,262 ▲885.68 ▲0.0384.33 ▼2.9440.71 ▼0.03
Posts /wp-admin/edit.php2,164 ▲821.99 ▼0.0436.00 ▲0.1532.10 ▼5.52
Add New Post /wp-admin/post-new.php1,566 ▲3822.98 ▼0.22666.96 ▼21.0155.70 ▲6.90
Media Library /wp-admin/upload.php1,462 ▲594.19 ▲0.0395.50 ▼5.0744.26 ▲0.92
Admin Area /wp-admin/admin.php?page=branding_group_admin1,6453.6762.56101.75
Utilities /wp-admin/admin.php?page=branding_group_utilities1,6123.6358.4858.76
Branda Pro /wp-admin/admin.php?page=branda_pro1,3563.6447.57102.31
Emails /wp-admin/admin.php?page=branding_group_emails1,5523.6251.6859.13
Widgets /wp-admin/admin.php?page=branding_group_widgets1,5143.5749.3458.02
Front-end /wp-admin/admin.php?page=branding_group_front-end1,6753.6151.9073.82
Dashboard /wp-admin/admin.php?page=branding2,6293.5844.58111.85
Settings /wp-admin/admin.php?page=branding_group_data2,0414.1265.0472.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 11 options
    • db_upgraded
    • branda_db_version
    • ub_permissions_users
    • widget_recent-comments
    • widget_recent-posts
    • branda_first_installed_version
    • ub_version
    • can_compress_scripts
    • ub_stats
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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 fix the following
  • 10× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/branda-white-labeling/views/admin/modules/admin-help-content/list.php
    • > /wp-content/plugins/branda-white-labeling/views/admin/modules/admin_menu/dialogs/custom-admin-menu-tab-content.php
    • > /wp-content/plugins/branda-white-labeling/views/front-end/modules/maintenance/timer/flipclock/body.php
    • > /wp-content/plugins/branda-white-labeling/views/front-end/modules/maintenance/timer/raw/body.php
    • > /wp-content/plugins/branda-white-labeling/views/admin/modules/admin_menu/dialogs/custom-admin-menu-tabs.php
    • > /wp-content/plugins/branda-white-labeling/views/admin/modules/admin_menu/dialogs/custom-admin-menu-tab.php
    • > /wp-content/plugins/branda-white-labeling/views/front-end/common/css/slideshow.php
    • > /wp-content/plugins/branda-white-labeling/views/admin/dashboard/welcome-modules.php
    • > /wp-content/plugins/branda-white-labeling/views/admin/modules/admin_menu/dialogs/custom-admin-menu-roles.php
    • > /wp-content/plugins/branda-white-labeling/views/admin/modules/admin-message/message.php
  • 682× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Branda_Vendor\\Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/branda-white-labeling/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Branda_Helper' not found in wp-content/plugins/branda-white-labeling/inc/modules/admin/help-content.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/branda-white-labeling/views/admin/modules/admin-panel-tips/tip.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\et\\SSH2' not found in wp-content/plugins/branda-white-labeling/vendor_prefixed/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/branda-white-labeling/views/admin/modules/tracking-codes/dialogs/edit.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Branda_Vendor\\Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/branda-white-labeling/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Branda_Helper' not found in wp-content/plugins/branda-white-labeling/inc/modules/utilities/site-generator.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Branda_Vendor\\Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/branda-white-labeling/vendor_prefixed/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Branda_Vendor\\Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/branda-white-labeling/vendor_prefixed/monolog/monolog/src/Monolog/Handler/GroupHandler.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Branda_Vendor\\Google\\Model' not found in wp-content/plugins/branda-white-labeling/vendor_prefixed/google/apiclient-services/src/Gmail/AutoForwarding.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Customize the WordPress login screen)
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

branda-white-labeling/ultimate-branding.php 92% from 13 tests

"Branda – White Label WordPress, Custom Login Page Customizer" version 3.4.13's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("branda-white-labeling.php" instead of "ultimate-branding.php")

Code Analysis 97% from 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 plugin193,856 lines of code in 1,213 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,01612,77573,644145,273
PO File58,23513,11420,979
JavaScript652,9292,23514,774
Sass38228404,366
CSS643073994,217
JSON4002,669
HTML12235122886
SVG402628
YAML24050
Dockerfile18010
Markdown2204

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 378)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity23.13
▷ Minimum class complexity1.00
▷ Maximum class complexity633.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity378.00
Code structure
Namespaces91
Interfaces72
Traits16
Classes748
▷ Abstract classes192.54%
▷ Concrete classes72997.46%
▷ Final classes527.13%
Methods6,718
▷ Static methods5818.65%
▷ Public methods5,40080.38%
▷ Protected methods4807.14%
▷ Private methods83812.47%
Functions492
▷ Named functions24650.00%
▷ Anonymous functions24650.00%
Constants981
▷ Global constants15215.49%
▷ Class constants82984.51%
▷ Public constants829100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
47 PNG files occupy 1.91MB with 0.92MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/branda/circle-thumb@2x.png53.92KB15.42KB▼ 71.40%
assets/css/vendor/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
assets/css/vendor/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
assets/images/branda/smtp-log-feature.png7.27KB2.39KB▼ 67.16%
assets/images/plugins-crawl-icon@2x.png9.04KB3.79KB▼ 58.04%