Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.38MB] [CPU: ▲0.24ms] Passed 4 tests
A check of server-side resources used by MyCitySelector
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.15 ▲0.42 | 45.88 ▲1.84 |
Dashboard /wp-admin | 3.95 ▲0.39 | 55.69 ▼0.13 |
Posts /wp-admin/edit.php | 4.00 ▲0.32 | 56.93 ▲2.79 |
Add New Post /wp-admin/post-new.php | 6.93 ▲0.78 | 95.14 ▼3.53 |
Media Library /wp-admin/upload.php | 3.88 ▲0.39 | 46.39 ▲7.55 |
Server storage [IO: ▲16.03MB] [DB: ▲0.01MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 868 new files
Database: 9 new tables, 7 new options
New tables |
---|
mcs_phinxlog |
mcs_provinces |
mcs_country_field_values |
mcs_field_values |
mcs_city_field_values |
mcs_countries |
mcs_cities |
mcs_province_field_values |
mcs_fields |
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
widget_mcs_widget |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
db_upgraded |
Browser metrics Passed 4 tests
MyCitySelector: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,027 ▲266 | 20.01 ▲5.87 | 13.67 ▲11.52 | 55.70 ▲8.89 |
Dashboard /wp-admin | 2,333 ▲159 | 8.01 ▲2.33 | 162.36 ▲63.67 | 96.14 ▲50.15 |
Posts /wp-admin/edit.php | 2,240 ▲158 | 5.37 ▲3.34 | 56.94 ▲20.40 | 35.30 ▼1.73 |
Add New Post /wp-admin/post-new.php | 1,644 ▲113 | 23.97 ▲0.65 | 712.81 ▲10.99 | 38.03 ▼13.33 |
Media Library /wp-admin/upload.php | 1,530 ▲127 | 7.40 ▲3.16 | 117.82 ▲8.60 | 82.83 ▲36.33 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- The plugin did not uninstall successfully, leaving 9 tables in the database
- mcs_fields
- mcs_provinces
- mcs_cities
- mcs_field_values
- mcs_countries
- mcs_phinxlog
- mcs_city_field_values
- mcs_country_field_values
- mcs_province_field_values
- The uninstall procedure has failed, leaving 7 options in the database
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- widget_mcs_widget
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test
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 take a closer look at the following
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/mycityselector/tests/bootstrap.php
- 367× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Mcs\\WpModels\\BaseModel' not found in wp-content/plugins/mycityselector/src/WpModels/ProvinceNames.php:9
- > PHP Fatal error
Uncaught Error: Class 'Cake\\Core\\ObjectRegistry' not found in wp-content/plugins/mycityselector/vendor/cakephp/datasource/ConnectionRegistry.php:29
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Model\\Country' not found in wp-content/plugins/mycityselector/vendor/geoip2/geoip2/src/Model/City.php:32
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/mycityselector/vendor/symfony/console/Command/HelpCommand.php:25
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Console\\Output\\StreamOutput' not found in wp-content/plugins/mycityselector/vendor/symfony/console/Output/ConsoleOutput.php:30
- > PHP Fatal error
Uncaught Error: Interface 'Phinx\\Migration\\MigrationInterface' not found in wp-content/plugins/mycityselector/vendor/robmorgan/phinx/src/Phinx/Migration/AbstractMigration.php:26
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\Filesystem\\Exception\\ExceptionInterface' not found in wp-content/plugins/mycityselector/vendor/symfony/filesystem/Exception/InvalidArgumentException.php:17
- > PHP Fatal error
Uncaught Error: Class 'Phinx\\Db\\Adapter\\PdoAdapter' not found in wp-content/plugins/mycityselector/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/MysqlAdapter.php:27
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Config\\Definition\\Exception\\Exception' not found in wp-content/plugins/mycityselector/vendor/symfony/config/Definition/Exception/UnsetKeyException.php:20
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\Console\\Event\\ConsoleEvent' not found in wp-content/plugins/mycityselector/vendor/symfony/console/Event/ConsoleErrorEvent.php:23
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
- Screenshots: Please add an image for screenshot #1 (Plugin admin interface)
mycityselector/mcs.php 85% from 13 tests
This is the main PHP file of "MyCitySelector" version 0.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("mycityselector.php" instead of "mcs.php")
- Text Domain: Please use dashes and lowercase characters for text domains
Code Analysis 5% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
These items require your attention
- Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
- .bat - Batch File in Windows
- ☣ wp-content/plugins/mycityselector/vendor/robmorgan/phinx/bin/phinx.bat
- .bat - Batch File in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 643 | 13,216 | 35,933 | 65,659 |
reStructuredText | 25 | 2,094 | 2,260 | 3,687 |
JSON | 34 | 0 | 0 | 3,079 |
TypeScript | 22 | 135 | 63 | 2,100 |
Markdown | 35 | 839 | 0 | 2,092 |
C | 1 | 118 | 25 | 668 |
YAML | 10 | 27 | 28 | 229 |
Bourne Shell | 5 | 42 | 13 | 200 |
SVG | 2 | 0 | 0 | 173 |
JavaScript | 9 | 16 | 11 | 129 |
XML | 3 | 8 | 12 | 108 |
JSX | 1 | 5 | 0 | 68 |
m4 | 1 | 8 | 0 | 32 |
Python | 5 | 25 | 23 | 31 |
DOS Batch | 1 | 12 | 6 | 23 |
HTML | 1 | 3 | 20 | 20 |
Dockerfile | 1 | 0 | 0 | 12 |
C/C++ Header | 1 | 4 | 12 | 8 |
CSS | 2 | 6 | 54 | 0 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 13.76 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 228.00 |
Average method complexity | 2.79 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 62.00 |
Code structure | ||
---|---|---|
Namespaces | 103 | |
Interfaces | 106 | |
Traits | 26 | |
Classes | 457 | |
▷ Abstract classes | 34 | 7.44% |
▷ Concrete classes | 423 | 92.56% |
▷ Final classes | 25 | 5.91% |
Methods | 4,522 | |
▷ Static methods | 412 | 9.11% |
▷ Public methods | 3,705 | 81.93% |
▷ Protected methods | 597 | 13.20% |
▷ Private methods | 220 | 4.87% |
Functions | 309 | |
▷ Named functions | 116 | 37.54% |
▷ Anonymous functions | 193 | 62.46% |
Constants | 355 | |
▷ Global constants | 12 | 3.38% |
▷ Class constants | 343 | 96.62% |
▷ Public constants | 279 | 81.34% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.12MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/banner-772x250.png | 44.03KB | 16.83KB | ▼ 61.77% |
assets/screenshot-1.png | 61.12KB | 29.07KB | ▼ 52.44% |
admin/public/logo192.png | 5.22KB | 5.57KB | 0.00% |
admin/public/logo512.png | 9.44KB | 10.35KB | 0.00% |