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
- > Deprecated in wp-content/plugins/country-flags-info-widget/country-flags-info-widget.php+453
Function create_function() is deprecated
Server metrics [RAM: ▼1.58MB] [CPU: ▼52.21ms] Passed 4 tests
Server-side resources used by Country Flags Info Widget
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.41 ▼1.05 | 5.73 ▼31.19 |
Dashboard /wp-admin | 2.43 ▼0.91 | 5.79 ▼53.50 |
Posts /wp-admin/edit.php | 2.43 ▼0.92 | 7.85 ▼37.00 |
Add New Post /wp-admin/post-new.php | 2.43 ▼3.45 | 6.39 ▼87.14 |
Media Library /wp-admin/upload.php | 2.43 ▼0.80 | 7.17 ▼28.32 |
Server storage [IO: ▲0.24MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 248 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
widget_countryflags |
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Country Flags Info Widget
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,795 ▲34 | 14.23 ▼0.32 | 1.77 ▲0.25 | 46.18 ▲7.15 |
Dashboard /wp-admin | 2,197 ▲20 | 5.56 ▼0.05 | 85.99 ▼0.38 | 38.38 ▼6.90 |
Posts /wp-admin/edit.php | 2,102 ▼1 | 2.01 ▲0.02 | 34.20 ▲0.30 | 33.47 ▼3.12 |
Add New Post /wp-admin/post-new.php | 1,528 ▲2 | 23.26 ▲0.17 | 665.99 ▲21.92 | 53.57 ▲0.06 |
Media Library /wp-admin/upload.php | 1,405 ▲11 | 4.20 ▲0.01 | 99.05 ▼1.51 | 45.76 ▲0.73 |
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
The following items require your attention
- This plugin did not uninstall without warnings or errors
- > Deprecated in wp-content/plugins/country-flags-info-widget/country-flags-info-widget.php+453
Function create_function() is deprecated
- This plugin does not fully uninstall, leaving 7 options in the database
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-posts
- widget_countryflags
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
- 1× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/country-flags-info-widget/country-flags-info-widget.php:14
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: flags, countries, widget, country
country-flags-info-widget/country-flags-info-widget.php Passed 13 tests
The principal PHP file in "Country Flags Info Widget" v. 1.0.0 is loaded by WordPress automatically on each request
99 characters long description:
Enables a widget in which you can display a list of country with flags, names and misc information.
Code Analysis 97% from 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 plugin602 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 28 | 12 | 414 |
CSS | 2 | 5 | 1 | 97 |
JavaScript | 1 | 17 | 1 | 91 |
PHP code 50% from 2 tests
An overview of cyclomatic complexity and code structure
It is recommended to fix the following
- Method cyclomatic complexity has to be reduced to less than 100 (currently 252)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.74 |
Average class complexity | 278.00 |
▷ Minimum class complexity | 278.00 |
▷ Maximum class complexity | 278.00 |
Average method complexity | 56.40 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 252.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 | 5 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 5 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
243 PNG files occupy 0.20MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
flags/VU.png | 1.24KB | 1.24KB | 0.16% |
flags/NR.png | 0.41KB | 0.30KB | ▼ 25.54% |
flags/GG.png | 0.24KB | 0.19KB | ▼ 23.20% |
flags/CR.png | 0.18KB | 0.13KB | ▼ 26.09% |
flags/JM.png | 0.60KB | 0.50KB | ▼ 16.50% |