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
Install script ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼2.43ms] Passed 4 tests
Server-side resources used by IF AS Shortcode
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.04 | 41.25 ▼2.04 |
Dashboard /wp-admin | 3.34 ▲0.03 | 45.64 ▼7.74 |
Posts /wp-admin/edit.php | 3.45 ▲0.09 | 48.36 ▲3.12 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.03 | 96.25 ▼3.04 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 39.30 ▲5.89 |
Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_restricted_content_widget |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for IF AS Shortcode
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,815 ▲80 | 13.21 ▼1.17 | 2.09 ▲0.17 | 42.14 ▼5.57 |
Dashboard /wp-admin | 2,211 ▲23 | 5.85 ▲0.97 | 108.16 ▼7.01 | 38.95 ▼8.50 |
Posts /wp-admin/edit.php | 2,091 ▲2 | 2.02 ▲0.03 | 39.90 ▲2.47 | 34.23 ▲0.66 |
Add New Post /wp-admin/post-new.php | 1,538 ▲18 | 23.55 ▲0.42 | 589.36 ▼93.35 | 58.00 ▲9.49 |
Media Library /wp-admin/upload.php | 1,393 ▲2 | 4.17 ▼0.07 | 98.65 ▼10.22 | 42.27 ▼5.48 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- The uninstall procedure has failed, leaving 7 options in the database
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
- db_upgraded
- widget_restricted_content_widget
- widget_theysaidso_widget
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% 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
The following issues need your attention
- 3× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/if-as-shortcode/include/js/index.php
- > /wp-content/plugins/if-as-shortcode/include/index.php
- > /wp-content/plugins/if-as-shortcode/lang/index.php
- 2× 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/if-as-shortcode/if_as_shortcode.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/if-as-shortcode/include/restricted-content.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
- Requires at least: Version format is invalid
if-as-shortcode/if_as_shortcode.php 92% from 13 tests
The main file in "IF AS Shortcode" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("if-as-shortcode.php" instead of "if_as_shortcode.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected519 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 109 | 127 | 343 |
JavaScript | 3 | 20 | 21 | 92 |
PO File | 1 | 31 | 31 | 84 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 30.00 |
▷ Minimum class complexity | 30.00 |
▷ Maximum class complexity | 30.00 |
Average method complexity | 4.22 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 29.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 18 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 18 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 8 | |
▷ Named functions | 8 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
include/if.png | 0.63KB | 0.33KB | ▼ 47.38% |