10% frontend-admin-menu

Code Review | Frontend admin menu

WordPress plugin Frontend admin menu scored10%from 54 tests.

About plugin

  • Plugin page: frontend-admin-menu
  • Plugin version: 3.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-5.0.1
  • WordPress version: 6.3.1
  • First release: May 19, 2015
  • Latest release: Dec 13, 2018
  • Number of updates: 75
  • Update frequency: every 17.4 days
  • Top authors: studiosweb (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active /8,698 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Compile error in wp-content/plugins/frontend-admin-menu/settings.php+11
    Cannot redeclare frontend_admin_menu_activation() (previously declared in wp-content/plugins/frontend-admin-menu/frontend-admin-menu.php:28)

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.48ms] Passed 4 tests

An overview of server-side resources used by Frontend admin menu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.52 ▲2.22
Dashboard /wp-admin3.31 ▲0.0046.13 ▼3.44
Posts /wp-admin/edit.php3.36 ▲0.0044.25 ▼4.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.50 ▼20.25
Media Library /wp-admin/upload.php3.23 ▲0.0036.88 ▲3.84

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Frontend admin menu
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.331.66 ▲0.1944.16 ▲7.41
Dashboard /wp-admin2,192 ▲155.50 ▼0.0484.53 ▼15.8743.19 ▼2.52
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0834.22 ▼1.9735.44 ▲2.07
Add New Post /wp-admin/post-new.php1,527 ▼023.00 ▼0.16670.13 ▲42.4762.23 ▲17.01
Media Library /wp-admin/upload.php1,397 ▼34.23 ▼0.0392.76 ▼5.3039.94 ▼1.88

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Almost there! Just fix the following items
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'FRONTEND_ADMIN_MENU_DIRincludes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/frontend-admin-menu/settings.php on line 3
    • > PHP Warning
      require_once(FRONTEND_ADMIN_MENU_DIRincludes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/frontend-admin-menu/settings.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'FRONTEND_ADMIN_MENU_DIRadmin/includes/gs-middle-options-page.php' (include_path='.:/usr/share/php') in wp-content/plugins/frontend-admin-menu/admin/options_admin_page.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_editable_roles() in wp-content/plugins/frontend-admin-menu/admin/includes/gs-middle-options-page.php:2
    • > PHP Warning
      Use of undefined constant FRONTEND_ADMIN_MENU_DIR - assumed 'FRONTEND_ADMIN_MENU_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/frontend-admin-menu/settings.php on line 3
    • > PHP Warning
      require_once(FRONTEND_ADMIN_MENU_DIRadmin/includes/gs-middle-options-page.php): failed to open stream: No such file or directory in wp-content/plugins/frontend-admin-menu/admin/options_admin_page.php on line 4
    • > PHP Warning
      Use of undefined constant FRONTEND_ADMIN_MENU_DIR - assumed 'FRONTEND_ADMIN_MENU_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/frontend-admin-menu/admin/options_admin_page.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/frontend-admin-menu/includes/functions.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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: administration menu, frontend menu, admin menu, backend menu, roles menu administration

frontend-admin-menu/frontend-admin-menu.php Passed 13 tests

The main PHP file in "Frontend admin menu" ver. 3.2.2 adds more information about the plugin and also serves as the entry point for this plugin
126 characters long description:
Create different menus for manage your site and then mapping user roles for each menus to display them as administration menu.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin3,365 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP612632366
CSS3403224
JavaScript2314104

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.50
▷ Minimum method complexity2.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/frontend-admin-menu-donate.png1.98KB1.48KB▼ 24.98%
admin/images/frontend_admin_menu-icon.png0.74KB0.90KB0.00%