Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲1.67MB] [CPU: ▲5.21ms] Passed 4 tests
This is a short check of server-side resources used by WPCS - WordPress Currency Switcher Professional
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 6.04 ▲2.58 | 55.54 ▲17.31 |
Dashboard /wp-admin | 5.25 ▲1.94 | 59.11 ▲12.98 |
Posts /wp-admin/edit.php | 5.25 ▲1.89 | 57.36 ▲11.99 |
Add New Post /wp-admin/post-new.php | 6.73 ▲0.84 | 89.94 ▼18.63 |
Media Library /wp-admin/upload.php | 5.25 ▲2.02 | 48.41 ▲14.51 |
Currency Switcher /wp-admin/options-general.php?page=currency-switcher-settings | 8.32 | 61.55 |
Server storage [IO: ▲5.20MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 106 new files
Database: no new tables, 11 new options
New WordPress options |
---|
widget_wpcs_rates |
wpcs_first_activation |
can_compress_scripts |
widget_wpcs_converter |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
widget_recent-comments |
widget_recent-posts |
widget_wpcs_selector |
... |
Browser metrics Passed 4 tests
An overview of browser requirements for WPCS - WordPress Currency Switcher Professional
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,948 ▲187 | 13.95 ▼0.40 | 12.09 ▲10.48 | 42.86 ▲4.15 |
Dashboard /wp-admin | 2,228 ▲57 | 5.81 ▲0.16 | 97.71 ▲7.05 | 42.88 ▲2.85 |
Posts /wp-admin/edit.php | 2,132 ▲32 | 2.27 ▲0.33 | 36.14 ▲1.82 | 34.44 ▼1.17 |
Add New Post /wp-admin/post-new.php | 1,544 ▲18 | 23.33 ▲0.19 | 668.76 ▲75.93 | 36.34 ▼17.84 |
Media Library /wp-admin/upload.php | 1,433 ▲30 | 4.39 ▲0.15 | 98.01 ▲4.15 | 46.68 ▲4.27 |
Currency Switcher /wp-admin/options-general.php?page=currency-switcher-settings | 6,604 | 13.28 | 335.94 | 169.55 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- Zombie WordPress options detected upon uninstall: 11 options
- theysaidso_admin_options
- widget_recent-posts
- wpcs_later_rate_alert
- widget_wpcs_converter
- widget_theysaidso_widget
- widget_wpcs_selector
- wpcs_first_activation
- db_upgraded
- widget_recent-comments
- widget_wpcs_rates
- ...
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
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 fix the following
- 23× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
- > /wp-content/plugins/currency-switcher/views/shortcodes/styles/style-1/index.php
- > /wp-content/plugins/currency-switcher/classes/auto_switcher.php
- > /wp-content/plugins/currency-switcher/views/shortcodes/wpcs_check_country.php
- > /wp-content/plugins/currency-switcher/views/widgets/selector_form.php
- > /wp-content/plugins/currency-switcher/classes/widgets/widget-currency-converter.php
- > /wp-content/plugins/currency-switcher/views/widgets/rates.php
- > /wp-content/plugins/currency-switcher/views/shortcodes/styles/style-3/index.php
- > /wp-content/plugins/currency-switcher/views/shortcodes/styles/style-2/index.php
- > /wp-content/plugins/currency-switcher/views/shortcodes/wpcs_rates.php
- > /wp-content/plugins/currency-switcher/views/auto_switcher/round_select.php
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/currency-switcher/views/options-data.php:10
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
- Screenshots: No descriptions were found for these screenshots #10, #11, #12, #13, #14, #8, #9 in currency-switcher/assets to your readme.txt
currency-switcher/index.php 85% from 13 tests
This is the main PHP file of "WPCS - WordPress Currency Switcher Professional" version 1.2.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
- Requires at least: Periods and digits should be used for the required version number (ex. "7.0" instead of "WP 3.5.0")
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("currency-switcher.php" instead of "index.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin29,857 lines of code in 83 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 30 | 821 | 237 | 12,613 |
CSS | 21 | 482 | 150 | 6,149 |
JavaScript | 24 | 921 | 193 | 5,320 |
HTML | 3 | 64 | 0 | 3,167 |
SVG | 1 | 0 | 0 | 1,839 |
Pascal | 2 | 45 | 1,757 | 385 |
PO File | 1 | 171 | 353 | 346 |
JSON | 1 | 0 | 0 | 38 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
It is recommended to fix the following
- Method cyclomatic complexity should be reduced to less than 100 (currently 171)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.52 |
Average class complexity | 47.30 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 370.00 |
Average method complexity | 5.65 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 171.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 10 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 10 | 100.00% |
▷ Final classes | 2 | 20.00% |
Methods | 98 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 93 | 94.90% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 5.10% |
Functions | 10 | |
▷ Named functions | 2 | 20.00% |
▷ Anonymous functions | 8 | 80.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
14 compressed PNG files occupy 0.29MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/woobe_banner.png | 46.74KB | 46.76KB | 0.00% |
img/wpcs_banner.png | 39.04KB | 39.12KB | 0.00% |
img/no_flag.png | 1.70KB | 1.09KB | ▼ 36.07% |
js/chosen/chosen-sprite-dark.png | 0.64KB | 0.43KB | ▼ 32.47% |
js/wselect/img/arrow-down.png | 0.42KB | 0.45KB | 0.00% |