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
This plugin's installer ran successfully
Server metrics [RAM: ▲0.08MB] [CPU: ▼6.54ms] Passed 4 tests
Server-side resources used by Posts API WP
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.08 | 37.69 ▼7.79 |
Dashboard /wp-admin | 3.38 ▲0.07 | 43.59 ▼11.88 |
Posts /wp-admin/edit.php | 3.49 ▲0.13 | 44.65 ▼0.92 |
Add New Post /wp-admin/post-new.php | 5.98 ▲0.09 | 98.11 ▼5.55 |
Media Library /wp-admin/upload.php | 3.30 ▲0.07 | 37.51 ▲5.90 |
Configure API /wp-admin/admin.php?page=posts-api-wp-config-api | 3.34 | 29.56 |
How To Use /wp-admin/admin.php?page=posts-api-wp-how-to-use | 3.27 | 31.42 |
Posts API WP /wp-admin/admin.php?page=posts-api-wp | 3.26 | 30.80 |
Server storage [IO: ▲0.10MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
Browser metrics Passed 4 tests
A check of browser resources used by Posts API WP
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,939 ▲182 | 13.61 ▼0.79 | 5.01 ▲3.03 | 37.72 ▼4.93 |
Dashboard /wp-admin | 2,240 ▲52 | 4.86 ▼1.01 | 102.31 ▼8.62 | 70.84 ▲24.18 |
Posts /wp-admin/edit.php | 2,117 ▲28 | 2.02 ▼0.01 | 39.72 ▲3.58 | 36.67 ▲2.30 |
Add New Post /wp-admin/post-new.php | 1,704 ▲170 | 24.70 ▲1.55 | 694.96 ▲26.82 | 69.70 ▲18.86 |
Media Library /wp-admin/upload.php | 1,413 ▲25 | 4.25 ▼0.14 | 101.33 ▼1.91 | 73.87 ▲27.39 |
Configure API /wp-admin/admin.php?page=posts-api-wp-config-api | 1,311 | 2.04 | 28.81 | 49.53 |
How To Use /wp-admin/admin.php?page=posts-api-wp-how-to-use | 836 | 2.03 | 29.08 | 35.95 |
Posts API WP /wp-admin/admin.php?page=posts-api-wp | 946 | 2.02 | 27.15 | 44.81 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- Zombie WordPress options were found after uninstall: 6 options
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Please take a closer look at the following
- 3× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/posts-api-wp/public/partials/posts-api-wp-public-display.php
- > /wp-content/plugins/posts-api-wp/admin/pages/footer.php
- > /wp-content/plugins/posts-api-wp/admin/partials/posts-api-wp-admin-display.php
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/posts-api-wp/templates/template-get-posts.php:30
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: posts, api, wp-posts, endpoint
posts-api-wp/posts-api-wp.php 92% from 13 tests
The main file in "Posts API WP" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
- Description: Keep the plugin description shorter than 140 characters (currently 203 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,124 lines of code in 23 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 17 | 176 | 641 | 757 |
CSS | 2 | 43 | 8 | 234 |
JavaScript | 2 | 11 | 74 | 70 |
HTML | 2 | 0 | 0 | 63 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.53 |
Average class complexity | 2.12 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 5.00 |
Average method complexity | 1.28 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 32 | |
▷ Static methods | 2 | 6.25% |
▷ Public methods | 27 | 84.38% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 15.62% |
Functions | 10 | |
▷ Named functions | 8 | 80.00% |
▷ Anonymous functions | 2 | 20.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/img/logo-menu.png | 0.71KB | 1.07KB | 0.00% |
admin/img/logo-main.png | 5.08KB | 2.95KB | ▼ 41.99% |
admin/img/exclamation-triangle.png | 6.17KB | 2.76KB | ▼ 55.37% |