84% admin-menu-tree-page-view

Code Review | Admin Menu Tree Page View

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

About plugin

  • Plugin page: admin-menu-tree-p...
  • Plugin version: 2.8.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: Sep 30, 2010
  • Latest release: Oct 26, 2023
  • Number of updates: 102
  • Update frequency: every 46.8 days
  • Top authors: eskapism (78.43%)butterflymedia (22.55%)

Code review

54 tests

User reviews

46 reviews

Install metrics

20,000+ active /306,388 total downloads

Benchmarks

Plugin footprint 83% from 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.10MB] [CPU: ▼1.75ms] Passed 4 tests

An overview 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.53 ▲0.0636.62 ▼1.93
Dashboard /wp-admin3.42 ▲0.1250.99 ▲0.93
Posts /wp-admin/edit.php3.48 ▲0.1245.72 ▼1.22
Add New Post /wp-admin/post-new.php6.02 ▲0.1385.57 ▼4.75
Media Library /wp-admin/upload.php3.35 ▲0.1235.95 ▲0.89
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.3234.68
AMTPV /wp-admin/options-general.php?page=amtpv3.3228.52

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Admin Menu Tree Page View
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲14913.11 ▼1.161.58 ▲0.0144.06 ▲3.63
Dashboard /wp-admin2,321 ▲1445.71 ▲0.19108.58 ▲18.0445.47 ▲7.38
Posts /wp-admin/edit.php2,230 ▲1332.52 ▲0.5040.03 ▲4.7335.72 ▼1.69
Add New Post /wp-admin/post-new.php1,634 ▲9723.39 ▲0.24662.23 ▼2.9636.66 ▼19.81
Media Library /wp-admin/upload.php1,528 ▲1254.44 ▲0.23109.80 ▲1.0247.30 ▲0.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-tree9102.1431.0134.90
AMTPV /wp-admin/options-general.php?page=amtpv9932.1532.0544.03

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-menu-tree-page-view/includes/settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/admin-menu-tree-page-view/index.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: cms, tree, page tree, admin, menu...

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

Analyzing the main PHP file in "Admin Menu Tree Page View" version 2.8.5
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file 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 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,974 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4175189649
PHP2198192550
CSS18310529
PO File669124215
XML17429
SVG2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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_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%
css/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%