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.09MB] [CPU: ▼5.72ms] Passed 4 tests
This is a short check of server-side resources used by Custom Post Type Calculator
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.58 ▲0.11 | 38.39 ▼1.95 |
Dashboard /wp-admin | 3.40 ▲0.09 | 52.31 ▲4.41 |
Posts /wp-admin/edit.php | 3.45 ▲0.09 | 48.47 ▼5.29 |
Add New Post /wp-admin/post-new.php | 5.98 ▲0.09 | 86.92 ▼13.34 |
Media Library /wp-admin/upload.php | 3.32 ▲0.09 | 37.03 ▼2.31 |
View Items /wp-admin/edit.php?post_type=items | 3.36 | 36.86 |
Add New Item /wp-admin/post-new.php?post_type=items | 3.38 | 49.67 |
CPTC Settings /wp-admin/edit.php?post_type=items&page=cptc_admin_page | 3.29 | 33.58 |
Item Categories /wp-admin/edit-tags.php?taxonomy=item_category&post_type=items | 3.32 | 36.81 |
Server storage [IO: ▲0.25MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 15 new options
New WordPress options |
---|
theysaidso_admin_options |
item_currency |
item_show_quote |
widget_recent-comments |
db_upgraded |
item_surface_label |
item_contact_section_title |
item_admin_email |
item_calculate_button_label |
item_measurement_label |
... |
Browser metrics Passed 4 tests
An overview of browser requirements for Custom Post Type Calculator
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,939 ▲178 | 13.81 ▼0.42 | 10.60 ▲8.88 | 36.94 ▼5.81 |
Dashboard /wp-admin | 2,230 ▲53 | 5.57 ▼0.06 | 83.70 ▼7.86 | 39.29 ▼4.01 |
Posts /wp-admin/edit.php | 2,132 ▲29 | 2.00 ▲0.06 | 39.48 ▼0.33 | 36.98 ▼1.32 |
Add New Post /wp-admin/post-new.php | 1,555 ▲27 | 23.05 ▼0.01 | 662.02 ▼51.22 | 67.78 ▲14.58 |
Media Library /wp-admin/upload.php | 1,438 ▲38 | 4.21 ▼0.01 | 98.10 ▼2.96 | 42.59 ▼3.05 |
View Items /wp-admin/edit.php?post_type=items | 1,108 | 1.98 | 30.59 | 31.25 |
Add New Item /wp-admin/post-new.php?post_type=items | 1,700 | 2.58 | 52.76 | 61.04 |
CPTC Settings /wp-admin/edit.php?post_type=items&page=cptc_admin_page | 900 | 1.99 | 22.50 | 39.91 |
Item Categories /wp-admin/edit-tags.php?taxonomy=item_category&post_type=items | 1,312 | 2.12 | 30.96 | 37.68 |
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
These items require your attention
- This plugin did not uninstall successfully, leaving 15 options in the database
- item_show_quote
- item_calculate_button_label
- item_contact_button_label
- widget_recent-posts
- item_surface_label
- widget_theysaidso_widget
- item_currency
- item_measurement_label
- theysaidso_admin_options
- item_result_label
- ...
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
- 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Warning
Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-post-type-calculator/cpt-calculator.php on line 27
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/custom-post-type-calculator/cpt-calculator.php:27
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 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
3 plugin tags: cpt, calculator, custom post type
custom-post-type-calculator/cpt-calculator.php 85% from 13 tests
The principal PHP file in "Custom Post Type Calculator" v. 0.9 is loaded by WordPress automatically on each request
Please take the time to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("custom-post-type-calculator.php" instead of "cpt-calculator.php")
- Description: Please keep the plugin description shorter than 140 characters (currently 161 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,270 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 1 | 126 | 109 | 811 |
PHP | 2 | 75 | 28 | 310 |
PO File | 2 | 50 | 50 | 134 |
JavaScript | 1 | 1 | 0 | 15 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.21 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 8 | |
▷ Named functions | 8 | 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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected