78% white-label-megapack-branding

Code Review | White Label Megapack Branding

WordPress plugin White Label Megapack Branding scored78%from 54 tests.

About plugin

  • Plugin page: white-label-megap...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 6.3.1
  • First release: Mar 26, 2021
  • Latest release: Mar 29, 2021
  • Number of updates: 10
  • Update frequency: every 0.4 days
  • Top authors: 4wpbari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /456 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
Install script ran successfully

Server metrics [RAM: ▲1.40MB] [CPU: ▲22.14ms] Passed 4 tests

This is a short check of server-side resources used by White Label Megapack Branding
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.59 ▲1.1253.61 ▲7.83
Dashboard /wp-admin4.88 ▲1.5781.89 ▲31.23
Posts /wp-admin/edit.php4.94 ▲1.5875.11 ▲29.76
Add New Post /wp-admin/post-new.php7.32 ▲1.43114.53 ▲19.86
Media Library /wp-admin/upload.php4.70 ▲1.4766.92 ▲31.11
Posts /wp-admin/admin.php?page=white-label-megapack-branding&tab=post-settings4.7562.31
Header Footer /wp-admin/admin.php?page=white-label-megapack-branding&tab=header-footer-admin-wordpress-settings4.7973.73
Media /wp-admin/admin.php?page=white-label-megapack-branding&tab=media-settings4.7466.83
Coming Soon /wp-admin/admin.php?page=white-label-megapack-branding&tab=coming-soon4.8072.47
Comments /wp-admin/admin.php?page=white-label-megapack-branding&tab=comments-settings4.7361.47
Manager Website Role /wp-admin/admin.php?page=white-label-megapack-branding&tab=managerwebsite-access4.7463.98
Admin Bar Detect /wp-admin/admin.php?page=white-label-megapack-branding?=auto-detect-admin-bar4.8062.10
Login Page /wp-admin/admin.php?page=white-label-megapack-branding&tab=login-settings4.7968.60
Cookie Bar /wp-admin/admin.php?page=white-label-megapack-branding&tab=cookie-bar-settings4.7463.46
Custom Code /wp-admin/admin.php?page=white-label-megapack-branding&tab=custom-code4.7371.14

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 71 new files
Database: 1 new table, 12 new options
New tables
wp_wlmpb_rrurlsredirect
New WordPress options
theysaidso_admin_options
wlmpb_login_logo_title
db_upgraded
wlmpb_custom_widget_count
wlmpb_custom_widget
widget_recent-comments
wlmpb_under_construction_body
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

White Label Megapack Branding: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,078 ▲31715.09 ▲0.711.77 ▲0.1339.87 ▲0.50
Dashboard /wp-admin2,476 ▲2956.41 ▲0.70125.16 ▲24.4845.69 ▲3.99
Posts /wp-admin/edit.php2,391 ▲2913.70 ▲1.7162.63 ▲28.8139.83 ▲2.37
Add New Post /wp-admin/post-new.php1,484 ▼4221.69 ▼1.72513.23 ▼133.0533.26 ▼25.49
Media Library /wp-admin/upload.php1,534 ▲1374.36 ▲0.1195.46 ▼4.0246.25 ▲2.39
Posts /wp-admin/admin.php?page=white-label-megapack-branding&tab=post-settings1,5913.3844.2865.99
Header Footer /wp-admin/admin.php?page=white-label-megapack-branding&tab=header-footer-admin-wordpress-settings2,8787.34174.4884.18
Media /wp-admin/admin.php?page=white-label-megapack-branding&tab=media-settings1,3773.3975.7137.98
Coming Soon /wp-admin/admin.php?page=white-label-megapack-branding&tab=coming-soon2,8738.04202.8167.65
Comments /wp-admin/admin.php?page=white-label-megapack-branding&tab=comments-settings1,3313.4843.1785.06
Manager Website Role /wp-admin/admin.php?page=white-label-megapack-branding&tab=managerwebsite-access1,4613.4441.3280.44
Admin Bar Detect /wp-admin/admin.php?page=white-label-megapack-branding?=auto-detect-admin-bar1,9723.2366.8941.11
Login Page /wp-admin/admin.php?page=white-label-megapack-branding&tab=login-settings2,3837.51187.0962.14
Cookie Bar /wp-admin/admin.php?page=white-label-megapack-branding&tab=cookie-bar-settings1,8103.99103.9740.31
Custom Code /wp-admin/admin.php?page=white-label-megapack-branding&tab=custom-code1,3623.4143.3948.97

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 12 options
    • can_compress_scripts
    • wlmpb_login_logo_url
    • widget_theysaidso_widget
    • wlmpb_login_logo_title
    • wlmpb_under_construction_title
    • wlmpb_custom_widget_count
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • wlmpb_under_construction_body
    • ...

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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/white-label-megapack-branding/white-label-megapack-branding.php
  • 42× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/white-label-megapack-branding/include/functions/custom-code/custom-code.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/white-label-megapack-branding/admin/settings/google-recaptcha-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/white-label-megapack-branding/admin/admin-pages/admin-bar.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/white-label-megapack-branding/admin/settings/comments-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/white-label-megapack-branding/include/functions/header-footer/header-footer.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Peace_Admin_Page' not found in wp-content/plugins/white-label-megapack-branding/admin/admin-menu.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/white-label-megapack-branding/admin/settings/custom-code.php:6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/white-label-megapack-branding/admin/add-custom-page/include/pages.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/white-label-megapack-branding/admin/add-custom-page/custom-admin-page.php:222
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/white-label-megapack-branding/admin/settings/main.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% 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
4 plugin tags: white label, branding, custom admin, manager website

white-label-megapack-branding/white-label-megapack-branding.php 92% from 13 tests

"White Label Megapack Branding" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 222 characters long)

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
Everything looks great! No dangerous files found in this plugin9,966 lines of code in 67 files:
LanguageFilesBlank linesComment linesLines of code
PHP542,1131,1338,073
CSS849221,414
JavaScript59591479

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity21.73
▷ Minimum class complexity2.00
▷ Maximum class complexity75.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods89
▷ Static methods33.37%
▷ Public methods7786.52%
▷ Protected methods44.49%
▷ Private methods88.99%
Functions176
▷ Named functions17599.43%
▷ Anonymous functions10.57%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.35MB with 0.27MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/settings/assets/white-label-megapack-branding-Logo.png120.90KB30.15KB▼ 75.07%
admin/admin-pages/assets/white-label-megapack-branding-Logo.png120.90KB30.15KB▼ 75.07%
admin/add-custom-page/assets/white-label-megapack-branding-Logo.png120.90KB30.15KB▼ 75.07%