Benchmarks
Plugin footprint 58% 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
The following installer errors require your attention
- This plugin did not install gracefully
- > Error in wp-content/plugins/w2pe-measurement-widget/index.php+46
Uncaught Error: Call to undefined function mysql_query() in wp-content/plugins/w2pe-measurement-widget/index.php:46
Stack trace:
#0 wp-includes/class-wp-hook.php(310): w2pe_measure_widget_table()
#1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#2 wp-includes/plugin.php(517): WP_Hook->do_action()
#3 wp-admin/includes/plugin.php(693): do_action()
Server metrics [RAM: ▲0.00MB] [CPU: ▼7.70ms] Passed 4 tests
An overview of server-side resources used by w2pe Measurement Widget
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 35.16 ▼4.30 |
Dashboard /wp-admin | 3.31 ▲0.00 | 45.94 ▲0.61 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 45.70 ▼6.66 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 82.13 ▼18.81 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 35.28 ▼1.03 |
Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 16 new files
Database: 1 new table, 6 new options
New tables |
---|
wp_w2pe_measure_units |
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
w2pe Measurement Widget: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.27 ▼1.13 | 1.60 ▼0.18 | 43.38 ▲3.82 |
Dashboard /wp-admin | 2,203 ▲18 | 4.86 ▼1.01 | 98.23 ▼5.05 | 38.33 ▼1.30 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 1.98 ▼0.07 | 36.26 ▼5.37 | 30.34 ▼5.88 |
Add New Post /wp-admin/post-new.php | 1,542 ▲23 | 18.34 ▼4.75 | 651.89 ▲1.92 | 57.03 ▼13.61 |
Media Library /wp-admin/upload.php | 1,391 ▲6 | 4.20 ▼0.11 | 98.03 ▼14.24 | 41.60 ▼4.70 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested
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
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/w2pe-measurement-widget/support.php
- 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/w2pe-measurement-widget/category.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/w2pe-measurement-widget/widget.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/w2pe-measurement-widget/page.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/w2pe-measurement-widget/units.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/w2pe-measurement-widget/index.php:19
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues 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: typography and digital image converter, measure, distance converter, unit conversion, temperature converter...
w2pe-measurement-widget/index.php 85% from 13 tests
The main file in "w2pe Measurement Widget" v. 1.00 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
- Description: Please keep the plugin description shorter than 140 characters (currently 186 characters long)
- Main file name: The principal plugin file should be the same as the plugin slug ("w2pe-measurement-widget.php" instead of "index.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin814 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 112 | 46 | 666 |
CSS | 2 | 4 | 7 | 79 |
JavaScript | 1 | 36 | 3 | 69 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 6.00 |
▷ Minimum class complexity | 6.00 |
▷ Maximum class complexity | 6.00 |
Average method complexity | 2.25 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.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 | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 11 | |
▷ Named functions | 11 | 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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/edit.png | 0.34KB | 0.39KB | 0.00% |
images/delete.png | 0.27KB | 0.37KB | 0.00% |
images/menu.png | 1.00KB | 0.22KB | ▼ 78.40% |