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
This plugin's installer ran successfully
Server metrics [RAM: ▲0.08MB] [CPU: ▼1.37ms] Passed 4 tests
Analyzing server-side resources used by My Custom Post Type
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.55 ▲0.09 | 41.68 ▼4.12 |
Dashboard /wp-admin | 3.38 ▲0.08 | 50.56 ▼2.54 |
Posts /wp-admin/edit.php | 3.44 ▲0.08 | 54.22 ▲1.34 |
Add New Post /wp-admin/post-new.php | 6.11 ▲0.22 | 104.94 ▲7.65 |
Media Library /wp-admin/upload.php | 3.31 ▲0.08 | 38.91 ▼0.14 |
Categories /wp-admin/edit-tags.php?taxonomy=news_cat&post_type=news | 3.30 | 38.59 |
Tags /wp-admin/edit-tags.php?taxonomy=news_tag&post_type=news | 3.30 | 37.04 |
Add New /wp-admin/post-new.php?post_type=news | 6.10 | 80.59 |
All News /wp-admin/edit.php?post_type=news | 3.35 | 42.12 |
Server storage [IO: ▲0.02MB] [DB: ▲0.31MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: 1 new table, 6 new options
New tables |
---|
wp_my_custom_post_type |
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-posts |
db_upgraded |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Checking browser requirements for My Custom Post Type
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,843 ▲82 | 14.29 ▼0.06 | 1.47 ▼0.57 | 39.45 ▼6.63 |
Dashboard /wp-admin | 2,246 ▲66 | 5.61 ▼0.07 | 88.64 ▼6.64 | 42.13 ▼5.90 |
Posts /wp-admin/edit.php | 2,151 ▲48 | 1.96 ▼0.04 | 39.06 ▲4.23 | 36.83 ▲0.21 |
Add New Post /wp-admin/post-new.php | 1,579 ▲40 | 18.32 ▲0.06 | 620.25 ▼44.50 | 68.49 ▲10.40 |
Media Library /wp-admin/upload.php | 1,451 ▲57 | 4.18 ▲0.02 | 100.73 ▼1.60 | 44.87 ▼0.61 |
Categories /wp-admin/edit-tags.php?taxonomy=news_cat&post_type=news | 1,322 | 2.12 | 26.87 | 32.89 |
Tags /wp-admin/edit-tags.php?taxonomy=news_tag&post_type=news | 1,300 | 2.12 | 27.75 | 30.35 |
Add New /wp-admin/post-new.php?post_type=news | 6,264 | 22.70 | 903.82 | 30.93 |
All News /wp-admin/edit.php?post_type=news | 1,179 | 1.99 | 30.92 | 32.24 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.31MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% 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
Please take a closer look at the following
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/my-custom-post-type/plugin-my-custom-post-type.php
- 2× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/my-custom-post-type/library/my-custom-post-type-rest-route.php:3
- > PHP Fatal error
Uncaught Error: Class 'My_Custom_Post_Type' not found in wp-content/plugins/my-custom-post-type/views/my-custom-post-type-input-form.php:4
- > 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 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
- Screenshots: Please add descriptions for these screenshots #1, #2, #3 in my-custom-post-type/assets to your readme.txt
my-custom-post-type/plugin-my-custom-post-type.php 92% from 13 tests
"My Custom Post Type" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("my-custom-post-type.php" instead of "plugin-my-custom-post-type.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
No dangerous file extensions were detected304 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 100 | 16 | 223 |
CSS | 1 | 6 | 0 | 41 |
JavaScript | 1 | 15 | 0 | 40 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 11.00 |
▷ Minimum class complexity | 11.00 |
▷ Maximum class complexity | 11.00 |
Average method complexity | 2.11 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 9 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 9 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin