84% treedbox-admin-menu

Code Review | Treedbox Admin Menu

WordPress plugin Treedbox Admin Menu scored84%from 54 tests.

About plugin

  • Plugin page: treedbox-admin-menu
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-5.0.3
  • WordPress version: 6.3.1
  • First release: Aug 18, 2014
  • Latest release: Feb 2, 2019
  • Number of updates: 22
  • Update frequency: every 74.2 days
  • Top authors: treedbox (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /2,392 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Analyzing server-side resources used by Treedbox Admin Menu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.83 ▼6.53
Dashboard /wp-admin3.31 ▲0.0045.56 ▼3.31
Posts /wp-admin/edit.php3.36 ▲0.0146.80 ▼6.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.79 ▼7.70
Media Library /wp-admin/upload.php3.23 ▲0.0034.37 ▲3.36

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Treedbox Admin Menu: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲3013.20 ▼0.991.70 ▼0.2639.17 ▼6.30
Dashboard /wp-admin2,210 ▲224.84 ▼1.07111.86 ▼0.2642.62 ▼3.21
Posts /wp-admin/edit.php2,093 ▲152.06 ▲0.0643.39 ▲0.1336.52 ▼0.68
Add New Post /wp-admin/post-new.php1,538 ▲1018.19 ▼0.20597.85 ▼45.5258.59 ▲6.02
Media Library /wp-admin/upload.php1,386 ▲44.18 ▼0.0297.74 ▼1.2043.62 ▼0.41

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/treedbox-admin-menu/treedbox_admin_menu.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
6 plugin tags: admin, wp-admin, top menu, menu, gutenberg...

treedbox-admin-menu/treedbox_admin_menu.php 85% from 13 tests

Analyzing the main PHP file in "Treedbox Admin Menu" version 1.0.5
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("treedbox-admin-menu.php" instead of "treedbox_admin_menu.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
Success! There were no dangerous files found in this plugin76 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS22469
PHP15267

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png14.87KB6.35KB▼ 57.30%
screenshot-2.png14.24KB6.13KB▼ 56.93%
screenshot-3.png11.73KB5.20KB▼ 55.67%