90% toggle-admin-menu

Code Review | Toggle Admin Menu

WordPress plugin Toggle Admin Menu scored90%from 54 tests.

About plugin

  • Plugin page: toggle-admin-menu
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Nov 3, 2014
  • Latest release: Nov 4, 2014
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: section214 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,045 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.98ms] Passed 4 tests

An overview of server-side resources used by Toggle Admin Menu
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.03 ▼3.72
Dashboard /wp-admin3.33 ▲0.0349.32 ▼1.63
Posts /wp-admin/edit.php3.38 ▲0.0248.82 ▲2.21
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.18 ▼8.77
Media Library /wp-admin/upload.php3.25 ▲0.0235.26 ▲2.34

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Toggle Admin Menu
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲17514.37 ▲0.021.39 ▼0.3548.53 ▲2.66
Dashboard /wp-admin2,337 ▲1605.67 ▲0.1491.57 ▲0.7040.59 ▼0.88
Posts /wp-admin/edit.php2,239 ▲1392.00 ▲0.0541.87 ▼0.0338.12 ▼1.43
Add New Post /wp-admin/post-new.php1,537 ▲723.63 ▲0.62702.35 ▲58.4651.25 ▼2.38
Media Library /wp-admin/upload.php1,539 ▲1424.19 ▲0.0399.05 ▲0.2543.90 ▲0.25

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: admin menu, hide, toggle

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

The main PHP script in "Toggle Admin Menu" version 1.0.0 is automatically included on every request by WordPress
51 characters long description:
Hide or show the dashboard admin menu with a click!

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin120 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP33911590
JavaScript11114
CSS1108
Markdown1508

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods350.00%
▷ Protected methods00.00%
▷ Private methods350.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin