63% frontend-admin

Code Review | Frontend Admin - Add and edit posts, pages, users and more all from the frontend

WordPress plugin Frontend Admin - Add and edit posts, pages, users and more all from the frontend scored 63% from 54 tests.

About plugin

  • Plugin page: frontend-admin
  • Plugin version: 3.3.41
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9.1
  • WordPress version: 5.9.2
  • First release: Jun 11, 2020
  • Latest release: Mar 24, 2022
  • Number of updates: 72
  • Update frequency: every 9.0 days
  • Top authors: shabti (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active / 8,126 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.67MB] [CPU: ▼275.99ms] Passed 4 tests

A check of server-side resources used by Frontend Admin - Add and edit posts, pages, users and more all from the frontend
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /6.25 ▲2.7464.55 ▲10.28
Dashboard /wp-admin6.03 ▲2.6243.81 ▲10.77
Posts /wp-admin/edit.php6.26 ▲2.6249.11 ▲12.76
Add New Post /wp-admin/post-new.php9.66 ▲2.69111.87 ▼1,137.70
Media Library /wp-admin/upload.php6.07 ▲2.7837.44 ▲12.70
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius6.3232.55

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 565 new files
Database: 1 new table, 7 new options
New tables
wp_fea_submissions
New WordPress options
acf_version
fs_accounts
fs_debug_mode
fs_gdpr
frontend_admin_hide_by
fs_active_plugins
frontend_admin_hide_wp_dashboard

Browser metrics Passed 4 tests

An overview of browser requirements for Frontend Admin - Add and edit posts, pages, users and more all from the frontend
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,833 ▲8915.68 ▼0.285.69 ▼0.782.24 ▼0.23
Dashboard /wp-admin2,942 ▲816.16 ▲0.01116.68 ▼13.59169.18 ▲11.19
Posts /wp-admin/edit.php2,738 ▲503.23 ▼0.0063.24 ▼0.18149.39 ▲10.31
Add New Post /wp-admin/post-new.php2,495 ▲83423.77 ▲7.67567.55 ▲158.25162.83 ▲9.49
Media Library /wp-admin/upload.php2,409 ▲71110.91 ▲5.41231.26 ▲97.45209.32 ▲23.60
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,4692.7053.85112.13

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/frontend-admin/includes/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_fea_submissions
  • Zombie WordPress options detected upon uninstall: 7 options
    • fs_active_plugins
    • frontend_admin_hide_wp_dashboard
    • frontend_admin_hide_by
    • fs_gdpr
    • fs_accounts
    • fs_debug_mode
    • acf_version

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 131× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/frontend-admin/includes/acf/includes/fields/class-acf-field-output.php:5
    • > PHP Notice
      Undefined variable: rule in wp-content/plugins/frontend-admin/includes/acf/includes/admin/views/html-location-rule.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/frontend-admin/includes/acf/includes/fields/class-acf-field-number.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Frontend_WP\\Widgets\\ACF_Frontend_Form_Widget' not found in wp-content/plugins/frontend-admin/main/elementor/widgets/posts/duplicate_post.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/frontend-admin/includes/acf/includes/acf-utility-functions.php:106
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/frontend-admin/main/elementor/widgets/general/edit_button.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'OxyEl' not found in wp-content/plugins/frontend-admin/main/oxygen/elements/general/frontend-form.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/frontend-admin/main/frontend/fields/user/role.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Frontend_WP\\Widgets\\ACF_Frontend_Form_Widget' not found in wp-content/plugins/frontend-admin/main/elementor/widgets/terms/edit_term.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field_text' not found in wp-content/plugins/frontend-admin/main/frontend/fields/user/username.php:5

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (The New Post Form widget enables users to add new posts to a custom or WordPress standard post type from the frontend of a WordPress website, without needing to interact with the WordPress dashboard. The page to host the form is built in Elementor. Important: By default a user needs to be logged in and carry the “administrator” role to add a post. This can be changed, however, in the Permissions settings of this widget.), #2 (The Field Type defines the type of field being edited. Changing this will affect the other available options. All the field types have options which can be changed to customize both the content and the style of the field.), #3 (Here we have several options for additional actions to take place outside the form itself. You can define where the page should redirect to after submitting. By default it will reload the current Page/Post. We can choose to redirect to the live post by selecting Custom URL. You can also define a custom success message, or choose no success message, whatever suits your needs.), #4 (This is where we limit which kinds of users can access the form. It is very important to configure this correctly, as otherwise your users might not be able to see the form at all! By default, only administrators can see the form. If you want to allow other users to access it, you need to add them. You can choose Roles under the Select By Role option, or add specific users under the Select By User option.), #5 (The Edit Post Form widget enables users to edit existing posts from the frontend of a WordPress website, without needing to interact with the WordPress dashboard.)
The official readme.txt is a good inspiration

frontend-admin/frontend-admin.php 85% from 13 tests

The primary PHP file in "Frontend Admin - Add and edit posts, pages, users and more all from the frontend" version 3.3.41 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist
  • Description: Keep the plugin description shorter than 140 characters (currently 155 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected205,603 lines of code in 463 files:
LanguageFilesBlank linesComment linesLines of code
PHP35820,28639,29072,596
PO File3123,80540,55148,965
JavaScript356,5386,34540,998
JSON20036,305
CSS346947466,721
SVG30018

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity32.26
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes248
▷ Abstract classes62.42%
▷ Concrete classes24297.58%
▷ Final classes10.41%
Methods2,693
▷ Static methods1866.91%
▷ Public methods2,30585.59%
▷ Protected methods421.56%
▷ Private methods34612.85%
Functions568
▷ Named functions56298.94%
▷ Anonymous functions61.06%
Constants145
▷ Global constants11881.38%
▷ Class constants2718.62%
▷ Public constants27100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/acf/assets/inc/datepicker/images/ui-icons_DDDDDD_256x240.png3.68KB4.17KB0.00%
includes/acf/assets/inc/select2/3/select2x2.png0.64KB0.77KB0.00%
includes/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
includes/acf/assets/inc/select2/3/select2.png0.51KB0.99KB0.00%
includes/acf/assets/images/acf-logo.png3.40KB3.39KB0.23%