74% frontend-dashboard

Code Review | Frontend Dashboard

WordPress plugin Frontend Dashboard scored 74% from 54 tests.

About plugin

  • Plugin page: frontend-dashboard
  • Plugin version: 2.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5.1
  • WordPress version: 5.8.1
  • First release: Aug 9, 2017
  • Latest release: Sep 17, 2020
  • Number of updates: 143
  • Update frequency: every 8.0 days
  • Top authors: vinoth06 (100%)

Code review

54 tests

User reviews

133 reviews

Install metrics

1,000+ active / 73,324 total downloads

Benchmarks

Plugin footprint 65% 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: ▲2.69MB] [CPU: ▼124.08ms] 75% from 4 tests

An overview of server-side resources used by Frontend Dashboard
Please have a look at the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 2,340.00ms on /wp-admin/admin.php?page=fed_plugin_pages)
PageMemory (MB)CPU Time (ms)
Home /5.46 ▲2.7452.07 ▲30.18
Dashboard /wp-admin5.79 ▲2.7460.49 ▲16.17
Posts /wp-admin/edit.php5.83 ▲2.7256.61 ▲5.75
Add New Post /wp-admin/post-new.php8.09 ▲2.66112.80 ▼534.72
Media Library /wp-admin/upload.php5.67 ▲2.6748.12 ▲16.50
Status /wp-admin/admin.php?page=fed_status5.6955.72
User Profile /wp-admin/admin.php?page=fed_user_profile5.6957.95
Dashboard Menu /wp-admin/admin.php?page=fed_dashboard_menu5.6957.12
Post Fields /wp-admin/admin.php?page=fed_post_fields5.6950.45
Add-Ons /wp-admin/admin.php?page=fed_plugin_pages5.782,340.00
Payments /wp-admin/admin.php?page=fed_payments5.6948.69
Help /wp-admin/admin.php?page=fed_help5.6948.06
Add Profile / Post Fields /wp-admin/admin.php?page=fed_add_user_profile5.6956.39
Membership Pro /wp-admin/admin.php?page=fed_membership_pro5.6947.75
Frontend Dashboard /wp-admin/admin.php?page=fed_settings_menu5.7065.81

Server storage [IO: ▲6.39MB] [DB: ▲0.02MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 272 new files
Database: 6 new tables, 6 new options
New tables
wp_fed_payment_items
wp_fed_user_profile
wp_fed_payment
wp_fed_menu_meta
wp_fed_post
wp_fed_menu
New WordPress options
fed_cp_admin_settings
fed_admin_settings_upl
fed_admin_settings_post
widget_fed-post-widget
fed_plugin_version
fed_admin_login

Browser metrics Passed 4 tests

Checking browser requirements for Frontend Dashboard
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,876 ▲23916.78 ▲1.3012.94 ▲2.4147.80 ▼3.02
Dashboard /wp-admin3,132 ▲1957.41 ▲1.46168.89 ▲21.28123.87 ▲7.21
Posts /wp-admin/edit.php2,809 ▲702.72 ▲0.0060.55 ▼2.1486.72 ▼9.92
Add New Post /wp-admin/post-new.php1,808 ▲30819.25 ▲0.68387.59 ▲19.68118.13 ▲11.02
Media Library /wp-admin/upload.php1,809 ▲25.01 ▲0.01126.06 ▼23.13125.13 ▼1.85
Status /wp-admin/admin.php?page=fed_status3,4246.66106.38131.13
User Profile /wp-admin/admin.php?page=fed_user_profile2,8855.82100.17111.14
Dashboard Menu /wp-admin/admin.php?page=fed_dashboard_menu16,8108.41281.78156.80
Post Fields /wp-admin/admin.php?page=fed_post_fields1,7005.6694.77103.98
Add-Ons /wp-admin/admin.php?page=fed_plugin_pages3,0636.50102.99133.40
Payments /wp-admin/admin.php?page=fed_payments1,9205.8594.67149.43
Help /wp-admin/admin.php?page=fed_help3,1306.1893.83109.36
Add Profile / Post Fields /wp-admin/admin.php?page=fed_add_user_profile1,6515.6994.5185.96
Membership Pro /wp-admin/admin.php?page=fed_membership_pro1,8665.7787.74115.13
Frontend Dashboard /wp-admin/admin.php?page=fed_settings_menu15,5134.80349.06144.21

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables were found after uninstall: 6 tables
    • wp_fed_payment
    • wp_fed_user_profile
    • wp_fed_menu
    • wp_fed_post
    • wp_fed_payment_items
    • wp_fed_menu_meta
  • Zombie WordPress options were found after uninstall: 6 options
    • fed_admin_settings_upl
    • fed_plugin_version
    • fed_admin_login
    • widget_fed-post-widget
    • fed_cp_admin_settings
    • fed_admin_settings_post

Smoke tests 75% 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 no errors were found, this is by no means an exhaustive test

SRP 50% 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 items
  • 25× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fed_register_only() in wp-content/plugins/frontend-dashboard/templates/login/register-only.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_exists() in wp-content/plugins/frontend-dashboard/includes/shortcodes/user-role.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/frontend-dashboard/templates/author.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_exists() in wp-content/plugins/frontend-dashboard/includes/shortcodes/payments/transactions.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/frontend-dashboard/vendor/template-loaders/page-template/layouts/fed_invoice.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fed_show_users_by_role() in wp-content/plugins/frontend-dashboard/templates/user_role.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_exists() in wp-content/plugins/frontend-dashboard/includes/shortcodes/dashboard/dashboard-shortcode.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function fed_get_transactions() in wp-content/plugins/frontend-dashboard/templates/payments/transactions.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_exists() in wp-content/plugins/frontend-dashboard/includes/shortcodes/login/register-only-shortcode.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_exists() in wp-content/plugins/frontend-dashboard/includes/shortcodes/login/login-only-shortcode.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

frontend-dashboard/frontend-dashboard.php Passed 13 tests

The main PHP file in "Frontend Dashboard" ver. 2.2.1 adds more information about the plugin and also serves as the entry point for this plugin
127 characters long description:
Frontend dashboard makes you flexible way to customize the user dashboard on frontend rather than WordPress wp-admin dashboard.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected53,592 lines of code in 172 files:
LanguageFilesBlank linesComment linesLines of code
PHP1372,1884,86120,237
CSS112,80213618,650
JavaScript141,7778398,122
SVG3003,927
PO File61,2301,4282,639
JSON10017

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity16.41
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods206
▷ Static methods2813.59%
▷ Public methods19393.69%
▷ Protected methods73.40%
▷ Private methods62.91%
Functions401
▷ Named functions39598.50%
▷ Anonymous functions61.50%
Constants19
▷ Global constants1473.68%
▷ Class constants526.32%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
25 PNG files occupy 0.39MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/inputs/checkbox.png3.15KB0.65KB▼ 79.32%
assets/admin/images/pro/buy-now-29.png32.08KB9.08KB▼ 71.70%
assets/admin/images/pro/buy-now-149.png32.50KB9.39KB▼ 71.10%
assets/frontend/images/d.png3.01KB0.34KB▼ 88.85%
assets/admin/images/chat.png1.34KB1.09KB▼ 19.17%