Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼0.00MB] [CPU: ▼144.30ms] Passed 4 tests
An overview of server-side resources used by Nutrition Facts
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.84 ▲0.01 | 41.93 ▲6.23 |
Dashboard /wp-admin | 3.06 ▲0.01 | 55.58 ▲8.81 |
Posts /wp-admin/edit.php | 3.11 ▲0.01 | 49.09 ▼4.90 |
Add New Post /wp-admin/post-new.php | 5.42 ▼0.02 | 133.56 ▼576.29 |
Media Library /wp-admin/upload.php | 3.00 ▲0.00 | 36.82 ▼2.24 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for Nutrition Facts
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,681 ▲75 | 15.85 ▼0.15 | 12.65 ▲2.47 | 51.30 ▼2.95 |
Dashboard /wp-admin | 2,970 ▲37 | 6.07 ▲0.05 | 144.07 ▼17.61 | 120.57 ▼16.55 |
Posts /wp-admin/edit.php | 2,739 ▼0 | 2.72 ▲0.02 | 67.83 ▼17.66 | 96.99 ▼3.06 |
Add New Post /wp-admin/post-new.php | 1,686 ▲71 | 18.96 ▼2.55 | 381.19 ▲63.81 | 125.55 ▲8.94 |
Media Library /wp-admin/upload.php | 1,807 ▼0 | 5.04 ▲0.03 | 153.43 ▼11.83 | 128.65 ▼8.96 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully
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
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nutrition-facts/nutrition-facts.php:60
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: block, recipe, nutrition label, facts label, nutrition guide
nutrition-facts/nutrition-facts.php 92% from 13 tests
The primary PHP file in "Nutrition Facts" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
- 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
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected60 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 5 | 16 | 40 |
JSON | 1 | 0 | 0 | 16 |
CSS | 2 | 4 | 0 | 3 |
JavaScript | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.07 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.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
PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected