94% admin-menu-tree-page-view

Code Review | Admin Menu Tree Page View

WordPress plugin Admin Menu Tree Page View scored 94% from 54 tests.

About plugin

  • Plugin page: admin-menu-tree-p...
  • Plugin version: 2.7.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.1
  • WordPress version: 5.9.2
  • First release: Sep 30, 2010
  • Latest release: Apr 19, 2021
  • Number of updates: 89
  • Update frequency: every 43.3 days
  • Top authors: eskapism (89.89%)butterflymedia (11.24%)

Code review

54 tests

User reviews

42 reviews

Install metrics

20,000+ active / 245,471 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼287.57ms] Passed 4 tests

A check of server-side resources used by Admin Menu Tree Page View
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0755.06 ▲3.24
Dashboard /wp-admin3.50 ▲0.0835.28 ▲2.07
Posts /wp-admin/edit.php3.72 ▲0.0838.86 ▲3.27
Add New Post /wp-admin/post-new.php6.97 ▼0.00100.20 ▼1,149.31
Media Library /wp-admin/upload.php3.38 ▲0.0724.81 ▼6.26
PagesSearchNo pages foundSample PageEdit|ViewAdd new pageAfter|InsidePost ID: 2DraftPrivacy PolicyEdit|ViewAdd new pageAfter|InsidePost ID: 3 /wp-admin/edit.php?post_type=page&page=admin-menu-tree-page-tree3.3527.50

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin Menu Tree Page View
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,964 ▲21016.46 ▲0.456.12 ▼0.852.28 ▼0.26
Dashboard /wp-admin3,072 ▲2116.57 ▲0.37123.23 ▼10.51183.61 ▲18.88
Posts /wp-admin/edit.php2,874 ▲1893.45 ▲0.0871.02 ▲6.57179.08 ▲37.78
Add New Post /wp-admin/post-new.php1,766 ▼716.04 ▼5.09452.55 ▲5.65175.12 ▲19.27
Media Library /wp-admin/upload.php1,875 ▲1775.93 ▲0.47128.10 ▼12.95213.98 ▲18.02
PagesSearchNo pages foundSample PageEdit|ViewAdd new pageAfter|InsidePost ID: 2DraftPrivacy PolicyEdit|ViewAdd new pageAfter|InsidePost ID: 3 /wp-admin/edit.php?post_type=page&page=admin-menu-tree-page-tree1,1463.3160.83129.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/admin-menu-tree-page-view/index.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: view, hierarchy, page, menu, cms...

admin-menu-tree-page-view/index.php 92% from 13 tests

This is the main PHP file of "Admin Menu Tree Page View" version 2.7.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("admin-menu-tree-page-view.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,669 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4175183655
CSS16910482
PHP1118136317
PO File669124215

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity2.00
▷ Minimum method complexity2.00
▷ Maximum method complexity2.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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
css/ui-icons_cccccc_256x240.png4.27KB4.11KB▼ 3.78%
css/page-small-minus.png0.23KB0.17KB▼ 26.81%
css/page-small-plus.png0.24KB0.17KB▼ 27.69%
css/page-small.png0.22KB0.16KB▼ 25.78%