Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.21MB] [CPU: ▼147.87ms] Passed 4 tests
This is a short check of server-side resources used by CodeFlavors Featured Post
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.97 ▲0.25 | 38.03 ▲14.04 |
Dashboard /wp-admin | 3.30 ▲0.25 | 50.83 ▼2.51 |
Posts /wp-admin/edit.php | 3.35 ▲0.24 | 49.66 ▼1.28 |
Add New Post /wp-admin/post-new.php | 5.60 ▲0.17 | 94.38 ▼591.72 |
Media Library /wp-admin/upload.php | 3.18 ▲0.18 | 37.36 ▲4.02 |
Featured Post by CodeFlavors /wp-admin/themes.php?page=cfp-options | 3.15 | 31.69 |
About CodeFlavors Featured Post /wp-admin/admin.php?page=cfp-about | 3.16 | 31.15 |
Server storage [IO: ▲0.09MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 1 new option
New WordPress options |
---|
widget_cfp-widget |
Browser metrics Passed 4 tests
A check of browser resources used by CodeFlavors Featured Post
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,844 ▲248 | 16.33 ▲0.47 | 15.73 ▲6.01 | 49.16 ▲1.19 |
Dashboard /wp-admin | 2,978 ▲44 | 5.89 ▼0.18 | 138.44 ▼21.03 | 118.52 ▲0.31 |
Posts /wp-admin/edit.php | 2,744 ▲8 | 2.68 ▼0.01 | 69.31 ▲1.61 | 96.88 ▲1.26 |
Add New Post /wp-admin/post-new.php | 1,501 ▼182 | 18.82 ▲0.48 | 403.83 ▲24.58 | 112.11 ▲0.40 |
Media Library /wp-admin/upload.php | 1,812 ▲5 | 5.02 ▼0.02 | 153.28 ▼10.73 | 126.82 ▲3.40 |
Featured Post by CodeFlavors /wp-admin/themes.php?page=cfp-options | 1,200 | 2.08 | 61.97 | 82.95 |
About CodeFlavors Featured Post /wp-admin/admin.php?page=cfp-about | 1,116 | 2.06 | 57.81 | 124.97 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- Zombie WordPress options detected upon uninstall: 1 option
- widget_cfp-widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% 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
Please fix the following
- 2× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/codeflavors-featured-post/includes/compatibility.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/codeflavors-featured-post/views/plugin_options.template.php:2
- > 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 93% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
- Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
codeflavors-featured-post/index.php 92% from 13 tests
The main PHP file in "CodeFlavors Featured Post" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("codeflavors-featured-post.php" instead of "index.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,678 lines of code in 15 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 189 | 383 | 1,103 |
PO File | 2 | 130 | 156 | 392 |
JavaScript | 1 | 19 | 12 | 151 |
CSS | 2 | 4 | 3 | 32 |
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 issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
Average class complexity | 8.33 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 26.00 |
Average method complexity | 2.29 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 21.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 1 | 16.67% |
▷ Concrete classes | 5 | 83.33% |
▷ Final classes | 1 | 20.00% |
Methods | 34 | |
▷ Static methods | 9 | 26.47% |
▷ Public methods | 29 | 85.29% |
▷ Protected methods | 2 | 5.88% |
▷ Private methods | 3 | 8.82% |
Functions | 25 | |
▷ Named functions | 25 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/admin/images/featured.png | 1.17KB | 0.87KB | ▼ 25.75% |
assets/admin/js/tinymce/featured_post/ico.png | 0.43KB | 0.39KB | ▼ 8.94% |