Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
- The plugin cannot be installed
- > Warning in wp-content/plugins/nutrition-facts-label/process.php+25
Use of undefined constant NUT_API - assumed 'NUT_API' (this will throw an Error in a future version of PHP)
Server metrics [RAM: ▼1.91MB] [CPU: ▼53.00ms] Passed 4 tests
Server-side resources used by Nutrition Facts Label
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.08 ▼1.38 | 4.95 ▼38.59 |
Dashboard /wp-admin | 2.10 ▼1.20 | 6.65 ▼41.56 |
Posts /wp-admin/edit.php | 2.10 ▼1.26 | 5.34 ▼41.47 |
Add New Post /wp-admin/post-new.php | 2.10 ▼3.79 | 5.53 ▼90.36 |
Media Library /wp-admin/upload.php | 2.10 ▼1.13 | 7.18 ▼30.20 |
Nutrition Label /wp-admin/admin.php?page=gfb-nutrition-label-settings | 2.10 | 5.79 |
Update Recipes /wp-admin/admin.php?page=gfb-nutrition-label-settings-1 | 2.10 | 6.74 |
Server storage [IO: ▲1.43MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
theysaidso_admin_options |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by Nutrition Facts Label
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,853 ▲118 | 13.72 ▼0.69 | 3.63 ▲1.78 | 41.76 ▼11.32 |
Dashboard /wp-admin | 2,245 ▲60 | 5.97 ▲0.16 | 103.43 ▼6.68 | 50.50 ▲4.99 |
Posts /wp-admin/edit.php | 2,131 ▲42 | 2.27 ▲0.22 | 32.57 ▼9.51 | 34.67 ▼1.20 |
Add New Post /wp-admin/post-new.php | 1,549 ▲30 | 23.42 ▲0.29 | 599.65 ▼83.62 | 33.97 ▼30.45 |
Media Library /wp-admin/upload.php | 1,433 ▲45 | 4.30 ▲0.12 | 94.28 ▼18.02 | 39.16 ▼10.42 |
Nutrition Label /wp-admin/admin.php?page=gfb-nutrition-label-settings | 1,102 | 1.97 | 30.47 | 68.55 |
Update Recipes /wp-admin/admin.php?page=gfb-nutrition-label-settings-1 | 834 | 1.80 | 23.11 | 27.01 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- This plugin cannot be uninstalled
- > Warning in wp-content/plugins/nutrition-facts-label/process.php+25
Use of undefined constant NUT_API - assumed 'NUT_API' (this will throw an Error in a future version of PHP)
- The uninstall procedure has failed, leaving 6 options in the database
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=gfb-nutrition-label-settings-1
- > Warning in wp-content/plugins/nutrition-facts-label/process.php+25
Use of undefined constant NUT_API - assumed 'NUT_API' (this will throw an Error in a future version of PHP)
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=gfb-nutrition-label-settings-1
- > Warning in wp-content/plugins/nutrition-facts-label/process.php+27
Use of undefined constant C_URL - assumed 'C_URL' (this will throw an Error in a future version of PHP)
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=gfb-nutrition-label-settings-1
- > Warning in wp-content/plugins/nutrition-facts-label/process.php+28
Use of undefined constant META_KEY - assumed 'META_KEY' (this will throw an Error in a future version of PHP)
- > GET request to /wp-admin/admin.php?page=gfb-nutrition-label-settings
- > Notice in wp-content/plugins/nutrition-facts-label/sections.php+15
Undefined variable: message
- > GET request to /wp-admin/admin.php?page=gfb-nutrition-label-settings
- > Notice in wp-content/plugins/nutrition-facts-label/sections.php+21
Undefined variable: readonly
- > GET request to /wp-admin/admin.php?page=gfb-nutrition-label-settings
- > Notice in wp-content/plugins/nutrition-facts-label/sections.php+21
Undefined variable: ingredients
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=gfb-nutrition-label-settings
- > Notice in wp-content/plugins/nutrition-facts-label/admin_front_end.php+1
Trying to get property 'ID' of non-object
SRP 0% 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
Please fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/nutrition-facts-label/nutrition-facts-label.php
- 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Notice
Undefined variable: ingredients in wp-content/plugins/nutrition-facts-label/sections.php on line 21
- > PHP Notice
Undefined variable: message in wp-content/plugins/nutrition-facts-label/sections.php on line 15
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/nutrition-facts-label/form.php:24
- > PHP Notice
Undefined variable: readonly in wp-content/plugins/nutrition-facts-label/sections.php on line 21
- > PHP Warning
Use of undefined constant C_URL - assumed 'C_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/nutrition-facts-label/process.php on line 27
- > PHP Notice
Trying to get property 'ID' of non-object in wp-content/plugins/nutrition-facts-label/sections.php on line 23
- > PHP Fatal error
Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/nutrition-facts-label/process.php:27
- > PHP Warning
Use of undefined constant C_URL - assumed 'C_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/nutrition-facts-label/sections.php on line 22
- > PHP Warning
Use of undefined constant NUT_API - assumed 'NUT_API' (this will throw an Error in a future version of PHP) in wp-content/plugins/nutrition-facts-label/process.php on line 25
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/nutrition-facts-label/admin_front_end.php:1
- > PHP Notice
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=gfb-nutrition-label-settings-1
- > Network (severe)
wp-content/plugins/nutrition-facts-label/includes/assets/css/jquery-ui-1.7.2.custom.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=gfb-nutrition-label-settings-1
- > Network (severe)
wp-content/plugins/nutrition-facts-label/includes/assets/javascript/jquery.ui.progressbar.min.js - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: recipe plugin, shortcode, nutrition label, nutrition, global food book...
nutrition-facts-label/nutrition-facts-label.php 85% from 13 tests
Analyzing the main PHP file in "Nutrition Facts Label" version 1.5
You should first fix the following items:
- Git Repository: A Git repository was detected inside this plugin
- Description: Keep the plugin description shorter than 140 characters (currently 214 characters long)
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
Good job! No executable or dangerous file extensions detected5,204 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 4 | 701 | 387 | 4,407 |
PHP | 8 | 60 | 59 | 416 |
CSS | 2 | 23 | 39 | 216 |
Markdown | 1 | 56 | 0 | 116 |
HTML | 1 | 4 | 0 | 49 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
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 | 16 | |
▷ Named functions | 16 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 1.12MB with 0.76MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 430.63KB | 124.39KB | ▼ 71.11% |
screenshot-1.png | 350.40KB | 105.33KB | ▼ 69.94% |
includes/assets/css/images/down.png | 2.77KB | 0.11KB | ▼ 95.98% |
includes/assets/images/beta.png | 0.83KB | 0.80KB | ▼ 4.45% |
includes/assets/css/images/up.png | 2.78KB | 0.11KB | ▼ 95.99% |