Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲0.25MB] [CPU: ▼2.20ms] Passed 4 tests
An overview of server-side resources used by Snillrik Restaurant
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.72 ▲0.25 | 41.37 ▼0.35 |
Dashboard /wp-admin | 3.55 ▲0.25 | 47.38 ▼4.28 |
Posts /wp-admin/edit.php | 3.66 ▲0.31 | 53.75 ▲7.93 |
Add New Post /wp-admin/post-new.php | 6.15 ▲0.26 | 84.61 ▼10.97 |
Media Library /wp-admin/upload.php | 3.47 ▲0.24 | 40.12 ▲6.82 |
All Menus /wp-admin/edit.php?post_type=snillrik_lm_menu | 3.52 | 39.37 |
All dishes /wp-admin/edit.php?post_type=snillrik_lm_dish | 3.52 | 36.56 |
Add new /wp-admin/post-new.php?post_type=snillrik_lm_menu | 3.70 | 54.64 |
Add new /wp-admin/post-new.php?post_type=snillrik_lm_dish | 3.68 | 56.18 |
Dish Tags /wp-admin/edit-tags.php?taxonomy=dishes-tags&post_type=snillrik_lm_dish | 3.47 | 35.16 |
Dish cat /wp-admin/edit-tags.php?taxonomy=dishes-category&post_type=snillrik_lm_dish | 3.47 | 35.59 |
Server storage [IO: ▲0.24MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
widget_recent-posts |
widget_snillrik_restaurant_dish_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
Checking browser requirements for Snillrik Restaurant
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,940 ▲194 | 14.35 ▼0.02 | 1.70 ▲0.10 | 41.36 ▲1.98 |
Dashboard /wp-admin | 2,328 ▲148 | 5.66 ▲0.03 | 84.86 ▼2.77 | 74.50 ▲28.81 |
Posts /wp-admin/edit.php | 2,254 ▲154 | 2.18 ▲0.14 | 36.15 ▼0.14 | 34.96 ▲1.48 |
Add New Post /wp-admin/post-new.php | 1,659 ▲131 | 21.05 ▼2.25 | 660.33 ▼27.11 | 40.87 ▼9.95 |
Media Library /wp-admin/upload.php | 1,548 ▲145 | 4.16 ▼0.08 | 99.90 ▲5.18 | 87.69 ▲45.28 |
All Menus /wp-admin/edit.php?post_type=snillrik_lm_menu | 1,266 | 2.13 | 31.84 | 30.11 |
All dishes /wp-admin/edit.php?post_type=snillrik_lm_dish | 1,271 | 2.14 | 32.68 | 30.45 |
Add new /wp-admin/post-new.php?post_type=snillrik_lm_menu | 3,338 | 9.10 | 198.84 | 147.23 |
Add new /wp-admin/post-new.php?post_type=snillrik_lm_dish | 3,409 | 9.30 | 205.49 | 118.50 |
Dish Tags /wp-admin/edit-tags.php?taxonomy=dishes-tags&post_type=snillrik_lm_dish | 1,397 | 2.28 | 29.70 | 32.86 |
Dish cat /wp-admin/edit-tags.php?taxonomy=dishes-category&post_type=snillrik_lm_dish | 1,428 | 2.28 | 28.59 | 30.21 |
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: 7 options
- widget_recent-comments
- widget_theysaidso_widget
- widget_snillrik_restaurant_dish_widget
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 4× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/snillrik-restaurant-menu/classes/menu.php
- > /wp-content/plugins/snillrik-restaurant-menu/classes/settings.php
- > /wp-content/plugins/snillrik-restaurant-menu/classes/shortcodes.php
- > /wp-content/plugins/snillrik-restaurant-menu/classes/dish.php
- 2× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/snillrik-restaurant-menu/snillrik_restaurant.php:18
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/snillrik-restaurant-menu/classes/widgets.php:6
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
- Screenshots: These screenshots lack descriptions #1, #2, #3 in snillrik-restaurant-menu/assets to your readme.txt
snillrik-restaurant-menu/snillrik_restaurant.php 77% from 13 tests
The main file in "Snillrik Restaurant" v. 2.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("snillrik-restaurant-menu.php" instead of "snillrik_restaurant.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
- Requires at least: Required version must match the one declared in readme.txt ("3.0" instead of "4.5.2")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,750 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 131 | 93 | 809 |
SVG | 2 | 5 | 2 | 484 |
CSS | 3 | 46 | 7 | 243 |
PO File | 1 | 63 | 65 | 166 |
JavaScript | 2 | 13 | 4 | 48 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 19.40 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 51.00 |
Average method complexity | 4.60 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 22.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 26 | |
▷ Static methods | 3 | 11.54% |
▷ Public methods | 26 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 5 | |
▷ Named functions | 4 | 80.00% |
▷ Anonymous functions | 1 | 20.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.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
3 PNG files occupy 0.13MB with 0.10MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/snillrik_medium.png | 46.02KB | 8.39KB | ▼ 81.77% |
images/dudes.png | 38.74KB | 16.98KB | ▼ 56.18% |
images/snillrik_small.png | 47.32KB | 4.84KB | ▼ 89.77% |