Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.43MB] [CPU: ▼1.22ms] Passed 4 tests
Analyzing server-side resources used by Shortcode to flag
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.92 ▲0.46 | 38.89 ▼3.04 |
Dashboard /wp-admin | 3.74 ▲0.43 | 48.29 ▼3.15 |
Posts /wp-admin/edit.php | 3.78 ▲0.42 | 52.89 ▲5.88 |
Add New Post /wp-admin/post-new.php | 6.31 ▲0.42 | 96.99 ▲0.71 |
Media Library /wp-admin/upload.php | 3.66 ▲0.43 | 36.50 ▲0.61 |
Server storage [IO: ▲0.56MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 248 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
Shortcode to flag: 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,802 ▲67 | 13.26 ▼1.11 | 1.75 ▲0.09 | 39.55 ▲1.38 |
Dashboard /wp-admin | 2,206 ▲18 | 4.84 ▼0.04 | 97.14 ▼8.09 | 41.51 ▼3.69 |
Posts /wp-admin/edit.php | 2,086 ▼6 | 1.99 ▼0.01 | 40.79 ▼1.91 | 35.54 ▼5.01 |
Add New Post /wp-admin/post-new.php | 1,533 ▲19 | 23.12 ▲5.42 | 633.64 ▼44.02 | 57.17 ▼2.58 |
Media Library /wp-admin/upload.php | 1,382 ▼6 | 4.26 ▲0.01 | 95.08 ▼15.28 | 42.92 ▼6.61 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- can_compress_scripts
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 75% 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 50% 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
Almost there! Just fix the following items
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shortcode-to-flag/shortcode-to-flag.php:33
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: shortcodes, flags, flag, shortcode, country
shortcode-to-flag/shortcode-to-flag.php Passed 13 tests
The principal PHP file in "Shortcode to flag" v. 1.0 is loaded by WordPress automatically on each request
51 characters long description:
Basic plugin that turns a shortcode to a flag image
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
Success! There were no dangerous files found in this plugin38 lines of code in 2 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 66 | 12 | 31 |
CSS | 1 | 0 | 0 | 7 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.14 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 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 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
242 PNG files occupy 0.55MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
flags/img/IR.png | 2.61KB | 2.14KB | ▼ 17.96% |
flags/img/BR.png | 3.67KB | 2.25KB | ▼ 38.63% |
flags/img/NZ.png | 3.09KB | 2.14KB | ▼ 30.81% |
flags/img/FK.png | 3.98KB | 2.29KB | ▼ 42.55% |
flags/img/RU.png | 1.30KB | 1.79KB | 0.00% |