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
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲1.26MB] [CPU: ▼290.06ms] Passed 4 tests
An overview of server-side resources used by The Post Grid
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.79 ▲1.27 | 62.29 ▲15.88 |
Dashboard /wp-admin | 4.70 ▲1.30 | 42.32 ▲8.33 |
Posts /wp-admin/edit.php | 4.93 ▲1.29 | 45.87 ▲9.94 |
Add New Post /wp-admin/post-new.php | 8.18 ▲1.21 | 103.23 ▼1,181.13 |
Media Library /wp-admin/upload.php | 4.59 ▲1.29 | 33.68 ▲2.61 |
All Grids /wp-admin/edit.php?post_type=rttpg | 4.63 | 32.79 |
Settings /wp-admin/edit.php?post_type=rttpg&page=rttpg_settings | 4.58 | 32.25 |
Add New Grid /wp-admin/post-new.php?post_type=rttpg | 4.98 | 62.93 |
Get Help /wp-admin/edit.php?post_type=rttpg&page=rttpg_get_help | 4.58 | 31.48 |
Server storage [IO: ▲4.70MB] [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: 169 new files
Database: no new tables, 4 new options
New WordPress options |
---|
rttpg_plugin_activation_time |
widget_widget_tpg_post_grid |
rt_the_post_grid_settings |
rt_the_post_grid_current_version |
Browser metrics Passed 4 tests
An overview of browser requirements for The Post Grid
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,927 ▲182 | 15.77 ▲0.11 | 6.13 ▲0.62 | 2.75 ▼0.06 |
Dashboard /wp-admin | 3,018 ▲157 | 6.13 ▼0.01 | 116.27 ▼21.52 | 187.81 ▲23.41 |
Posts /wp-admin/edit.php | 2,781 ▲87 | 3.14 ▼0.10 | 65.92 ▲2.83 | 149.28 ▲12.69 |
Add New Post /wp-admin/post-new.php | 1,768 ▼5 | 18.50 ▼3.39 | 417.76 ▼36.11 | 176.76 ▲20.36 |
Media Library /wp-admin/upload.php | 1,739 ▲41 | 5.51 ▲0.02 | 125.63 ▼18.06 | 206.70 ▲17.66 |
All Grids /wp-admin/edit.php?post_type=rttpg | 1,544 | 3.21 | 63.29 | 127.11 |
Settings /wp-admin/edit.php?post_type=rttpg&page=rttpg_settings | 1,492 | 2.69 | 58.12 | 191.98 |
Add New Grid /wp-admin/post-new.php?post_type=rttpg | 10,699 | 7.39 | 281.80 | 274.06 |
Get Help /wp-admin/edit.php?post_type=rttpg&page=rttpg_get_help | 2,229 | 9.50 | 257.86 | 243.27 |
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
The following items require your attention
- This plugin does not fully uninstall, leaving 4 options in the database
- rt_the_post_grid_settings
- rttpg_plugin_activation_time
- rt_the_post_grid_current_version
- widget_widget_tpg_post_grid
Smoke tests 75% 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 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 items
- 107× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function rtTPG() in wp-content/plugins/the-post-grid/lib/views/settings/item-fields.php:3
- > PHP Warning
in_array() expects parameter 2 to be array, null given in wp-content/plugins/the-post-grid/lib/templates/layouts/layout3.php on line 33
- > PHP Notice
Undefined variable: items in wp-content/plugins/the-post-grid/lib/templates/layouts/layout5.php on line 33
- > PHP Notice
Undefined variable: items in wp-content/plugins/the-post-grid/lib/templates/layouts/layout7.php on line 47
- > PHP Notice
Undefined variable: items in wp-content/plugins/the-post-grid/lib/templates/layouts/layout1.php on line 18
- > PHP Notice
Undefined variable: items in wp-content/plugins/the-post-grid/lib/templates/layouts/layout3.php on line 18
- > PHP Warning
in_array() expects parameter 2 to be array, null given in wp-content/plugins/the-post-grid/lib/templates/layouts/layout6.php on line 33
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/the-post-grid/lib/views/settings/settings.php:3
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/the-post-grid/lib/widgets/RT_TPGWidget.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/the-post-grid/lib/templates/layouts/layout2.php:39
- > 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, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
- Donate link: Invalid URI found ("")
the-post-grid/the-post-grid.php 92% from 13 tests
The main PHP file in "The Post Grid" ver. 3.1.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Description: Please keep the plugin description shorter than 140 characters (currently 141 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin26,455 lines of code in 56 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
SVG | 4 | 0 | 0 | 10,207 |
PHP | 35 | 802 | 446 | 7,796 |
CSS | 6 | 755 | 101 | 4,158 |
JavaScript | 9 | 696 | 875 | 3,990 |
PO File | 2 | 124 | 128 | 304 |
PHP code 50% from 2 tests
Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 357)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.60 |
Average class complexity | 76.05 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 365.00 |
Average method complexity | 8.18 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 357.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 20 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 20 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 210 | |
▷ Static methods | 13 | 6.19% |
▷ Public methods | 190 | 90.48% |
▷ Protected methods | 3 | 1.43% |
▷ Private methods | 17 | 8.10% |
Functions | 5 | |
▷ Named functions | 1 | 20.00% |
▷ Anonymous functions | 4 | 80.00% |
Constants | 8 | |
▷ Global constants | 8 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
86 PNG files occupy 0.22MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/layouts/grid10.png | 2.14KB | 1.36KB | ▼ 36.21% |
assets/images/layouts/grid_layout8.png | 2.18KB | 1.20KB | ▼ 44.80% |
assets/images/layouts/grid5.png | 2.24KB | 1.25KB | ▼ 44.06% |
assets/images/layouts/edd3.png | 2.63KB | 1.50KB | ▼ 42.80% |
assets/images/layouts/grid3.png | 2.43KB | 1.44KB | ▼ 40.60% |