Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.10MB] [CPU: ▼9.31ms] Passed 4 tests
A check of server-side resources used by Conditional Menus
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.56 ▲0.10 | 39.28 ▼5.79 |
Dashboard /wp-admin | 3.40 ▲0.10 | 55.78 ▼1.43 |
Posts /wp-admin/edit.php | 3.52 ▲0.16 | 52.55 ▼15.95 |
Add New Post /wp-admin/post-new.php | 5.99 ▲0.10 | 86.37 ▼14.07 |
Media Library /wp-admin/upload.php | 3.33 ▲0.10 | 44.10 ▲4.60 |
Conditional Menus /wp-admin/tools.php?page=conditional-menus | 3.31 | 36.67 |
Server storage [IO: ▲0.10MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-posts |
widget_recent-comments |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Checking browser requirements for Conditional Menus
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 14.72 ▲0.16 | 2.19 ▲0.63 | 42.42 ▼1.39 |
Dashboard /wp-admin | 2,202 ▲28 | 5.64 ▲0.04 | 86.01 ▼12.00 | 40.50 ▼2.79 |
Posts /wp-admin/edit.php | 2,104 ▲1 | 2.01 ▼0.02 | 44.56 ▲7.64 | 33.31 ▼3.61 |
Add New Post /wp-admin/post-new.php | 1,537 ▲11 | 21.03 ▼2.00 | 685.30 ▼5.80 | 53.86 ▼3.35 |
Media Library /wp-admin/upload.php | 1,404 ▲7 | 4.14 ▲0.03 | 93.83 ▼17.01 | 38.97 ▼8.51 |
Conditional Menus /wp-admin/tools.php?page=conditional-menus | 816 | 2.11 | 21.97 | 26.79 |
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
You still need to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-posts
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/conditional-menus/templates/conditions.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: menu, admin, menu-items, context, conditional-tags
conditional-menus/init.php 85% from 13 tests
The principal PHP file in "Conditional Menus" v. 1.2.3 is loaded by WordPress automatically on each request
The following require your attention:
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
- Main file name: It is recommended to name the main PHP file as the plugin slug ("conditional-menus.php" instead of "init.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin1,328 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 63 | 79 | 569 |
CSS | 2 | 7 | 6 | 521 |
JavaScript | 2 | 27 | 11 | 225 |
HTML | 1 | 0 | 0 | 13 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 1.00 |
Average class complexity | 168.00 |
▷ Minimum class complexity | 168.00 |
▷ Maximum class complexity | 168.00 |
Average method complexity | 7.19 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 87.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 27 | |
▷ Static methods | 3 | 11.11% |
▷ Public methods | 24 | 88.89% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 11.11% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.03MB
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
docs/images/conditional-menus.png | 29.36KB | 31.14KB | 0.00% |