73% display-admin-page-on-frontend

Code Review | WP Frontend Admin - Display WP Admin Pages in the Frontend

WordPress plugin WP Frontend Admin - Display WP Admin Pages in the Frontend scored73%from 54 tests.

About plugin

  • Plugin page: display-admin-pag...
  • Plugin version: 1.21.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.2
  • WordPress version: 6.3.1
  • First release: Mar 25, 2018
  • Latest release: Jul 5, 2023
  • Number of updates: 84
  • Update frequency: every 23.0 days
  • Top authors: JoseVega (100%)

Code review

54 tests

User reviews

48 reviews

Install metrics

400+ active /23,138 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲5.72MB] [CPU: ▲31.24ms] 50% from 4 tests

An overview of server-side resources used by WP Frontend Admin - Display WP Admin Pages in the Frontend
Please have a look at the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,890.37ms on /wp-admin/admin.php?page=wpatof_welcome_page)
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.72MB on /wp-admin/admin.php?page=wpatof_welcome_page)
PageMemory (MB)CPU Time (ms)
Home /9.40 ▲5.9476.10 ▲35.29
Dashboard /wp-admin9.42 ▲6.1286.51 ▲34.35
Posts /wp-admin/edit.php9.43 ▲6.0788.22 ▲41.24
Add New Post /wp-admin/post-new.php10.64 ▲4.75130.74 ▲14.08
Media Library /wp-admin/upload.php9.42 ▲6.2090.68 ▲53.40
Frontend Admin /wp-admin/admin.php?page=wpatof_whats_new9.4271.10
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.4264.17
Frontend Admin /wp-admin/admin.php?page=wpatof_welcome_page9.421,890.37

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 228 new files
Database: no new tables, 10 new options
New WordPress options
fs_accounts
can_compress_scripts
fs_debug_mode
db_upgraded
theysaidso_admin_options
wpatof_welcome_redirect
widget_recent-posts
fs_active_plugins
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Frontend Admin - Display WP Admin Pages in the Frontend
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,869 ▲10813.57 ▼0.801.64 ▼0.2528.10 ▼17.07
Dashboard /wp-admin2,260 ▲575.85 ▲0.03100.99 ▼4.7177.20 ▲36.08
Posts /wp-admin/edit.php2,155 ▲552.03 ▲0.0636.61 ▼10.5540.41 ▲4.48
Add New Post /wp-admin/post-new.php1,716 ▲17122.33 ▼0.68681.25 ▲7.9434.49 ▼30.56
Media Library /wp-admin/upload.php1,454 ▲544.30 ▲0.08114.11 ▲7.7098.28 ▲49.91
Frontend Admin /wp-admin/admin.php?page=wpatof_whats_new8261.6828.5032.76
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1161.7330.4326.67
Frontend Admin /wp-admin/admin.php?page=wpatof_welcome_page1,0161.7931.4865.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/display-admin-page-on-frontend/vendor/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 10 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • wpatof_welcome_redirect
    • fs_accounts
    • fs_debug_mode
    • db_upgraded
    • fs_active_plugins
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 27× 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 _e() in wp-content/plugins/display-admin-page-on-frontend/vendor/vg-plugin-sdk/views/settings-form.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/display-admin-page-on-frontend/views/frontend/wrong-plan.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses_post() in wp-content/plugins/display-admin-page-on-frontend/views/frontend/logged-in-user-not-allowed.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/display-admin-page-on-frontend/inc/compatibility/elementor.php:193
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/display-admin-page-on-frontend/views/frontend/page.php:127
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/display-admin-page-on-frontend/views/welcome-page-content.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/display-admin-page-on-frontend/inc/change-texts.php:14
    • > PHP Notice
      Undefined variable: minimum_height_px in wp-content/plugins/display-admin-page-on-frontend/views/frontend/page.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/display-admin-page-on-frontend/inc/shortcodes.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/display-admin-page-on-frontend/inc/access-restrictions.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: user dashboard, frontend dashboard, dashboard, custom dashboard, frontend editor

display-admin-page-on-frontend/index.php 85% from 13 tests

The entry point to "WP Frontend Admin - Display WP Admin Pages in the Frontend" version 1.21.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("display-admin-page-on-frontend.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin46,194 lines of code in 172 files:
LanguageFilesBlank linesComment linesLines of code
PHP1458,62217,51538,497
PO File51,0781,3745,660
JavaScript61942361,620
CSS161315417

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity89.32
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes00.00%
Methods1,450
▷ Static methods20614.21%
▷ Public methods1,05272.55%
▷ Protected methods171.17%
▷ Private methods38126.28%
Functions109
▷ Named functions10899.08%
▷ Anonymous functions10.92%
Constants146
▷ Global constants9967.81%
▷ Class constants4732.19%
▷ Public constants47100.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
7 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/imgs/wp-admin-icon.png0.80KB1.07KB0.00%
assets/imgs/page-not-allowed-instructions.png30.85KB12.04KB▼ 60.97%
assets/imgs/logo.png9.02KB4.18KB▼ 53.66%
vendor/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/imgs/toolbar-item-screenshot.png17.46KB6.76KB▼ 61.28%