Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.15MB] [CPU: ▼6.35ms] Passed 4 tests
A check of server-side resources used by Units
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.61 ▲0.15 | 39.51 ▲3.67 |
Dashboard /wp-admin | 3.51 ▲0.16 | 44.35 ▼15.84 |
Posts /wp-admin/edit.php | 3.56 ▲0.20 | 48.05 ▲1.38 |
Add New Post /wp-admin/post-new.php | 6.04 ▲0.16 | 89.31 ▼14.60 |
Media Library /wp-admin/upload.php | 3.37 ▲0.14 | 38.21 ▲4.34 |
Units /wp-admin/options-general.php?page=unit-switcher | 3.35 | 29.98 |
Server storage [IO: ▲0.11MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 79 new files
Database: no new tables, 10 new options
New WordPress options |
---|
widget_recent-posts |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
unitswitcher_cache |
can_compress_scripts |
unitswitcher_save |
db_upgraded |
unitswitcher_dependencies |
unitswitcher_units |
Browser metrics Passed 4 tests
A check of browser resources used by Units
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,920 ▲174 | 13.91 ▼0.35 | 12.46 ▲10.54 | 39.57 ▼0.56 |
Dashboard /wp-admin | 2,203 ▲26 | 5.55 ▼0.10 | 82.85 ▼2.63 | 39.72 ▼9.30 |
Posts /wp-admin/edit.php | 2,114 ▲14 | 2.02 ▲0.01 | 41.98 ▲0.84 | 36.26 ▲1.08 |
Add New Post /wp-admin/post-new.php | 1,536 ▲7 | 22.93 ▼0.65 | 592.44 ▼7.63 | 50.28 ▼8.49 |
Media Library /wp-admin/upload.php | 1,414 ▲14 | 4.21 ▼0.05 | 100.68 ▼7.19 | 43.65 ▼3.33 |
Units /wp-admin/options-general.php?page=unit-switcher | 945 | 1.70 | 24.82 | 29.43 |
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
The following items require your attention
- The uninstall procedure has failed, leaving 10 options in the database
- unitswitcher_save
- unitswitcher_units
- can_compress_scripts
- unitswitcher_cache
- widget_recent-posts
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- unitswitcher_dependencies
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
- > GET request to /wp-admin/options-general.php?page=unit-switcher
- > Warning in wp-content/plugins/units/app/Helpers.php+47
file_get_contents(wp-content/plugins/units/assets/js/src/dropdown.js): failed to open stream: No such file or directory
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
- 32× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/units/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php:4
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\Test\\TestCase' not found in wp-content/plugins/units/vendor/composer/installers/tests/Composer/Installers/Test/InstallerTest.php:11
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/units/vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php:7
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/units/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php:4
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/units/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php:4
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installer\\LibraryInstaller' not found in wp-content/plugins/units/vendor/composer/installers/src/Composer/Installers/Installer.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/units/app/Views/settings/settings-units.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/units/app/Views/settings/settings.php:2
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/units/vendor/composer/installers/src/Composer/Installers/MakoInstaller.php:4
- > PHP Fatal error
Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/units/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php:4
- > 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 on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: measurements, localization, units
units/units.php 92% from 13 tests
Analyzing the main PHP file in "Units" version 1.0.2
Please take the time to fix the following:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected2,418 lines of code in 73 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 59 | 362 | 649 | 1,855 |
JavaScript | 5 | 42 | 72 | 218 |
JSON | 3 | 0 | 0 | 139 |
Markdown | 1 | 32 | 0 | 130 |
CSS | 3 | 1 | 0 | 45 |
XML | 1 | 2 | 0 | 23 |
YAML | 1 | 3 | 0 | 8 |
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.26 |
Average class complexity | 3.77 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 37.00 |
Average method complexity | 2.02 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 10 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 47 | |
▷ Abstract classes | 2 | 4.26% |
▷ Concrete classes | 45 | 95.74% |
▷ Final classes | 0 | 0.00% |
Methods | 129 | |
▷ Static methods | 9 | 6.98% |
▷ Public methods | 98 | 75.97% |
▷ Protected methods | 9 | 6.98% |
▷ Private methods | 22 | 17.05% |
Functions | 8 | |
▷ Named functions | 6 | 75.00% |
▷ Anonymous functions | 2 | 25.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/caret.png | 1.06KB | 0.16KB | ▼ 85.12% |
assets/images/caret-up.png | 0.98KB | 0.17KB | ▼ 83.08% |