Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼262.42ms] Passed 4 tests
Server-side resources used by CPT Template Path
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.84 ▲0.12 | 51.10 ▲27.20 |
Dashboard /wp-admin | 3.06 ▲0.01 | 43.91 ▲0.02 |
Posts /wp-admin/edit.php | 3.12 ▲0.01 | 44.04 ▼2.24 |
Add New Post /wp-admin/post-new.php | 5.43 ▼0.00 | 104.83 ▼1,042.86 |
Media Library /wp-admin/upload.php | 3.01 ▼0.00 | 35.07 ▼4.61 |
Server storage [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for CPT Template Path
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,649 ▲43 | 15.90 ▲0.37 | 9.08 ▼0.54 | 66.88 ▲15.26 |
Dashboard /wp-admin | 2,933 ▲83 | 5.96 ▲0.12 | 144.58 ▲1.28 | 112.45 ▲0.74 |
Posts /wp-admin/edit.php | 2,706 ▼0 | 2.69 ▲0.01 | 67.00 ▼1.98 | 93.89 ▼3.30 |
Add New Post /wp-admin/post-new.php | 1,653 ▲172 | 18.83 ▲0.28 | 378.18 ▼9.08 | 117.37 ▲0.23 |
Media Library /wp-admin/upload.php | 1,772 ▼0 | 5.01 ▲0.00 | 159.55 ▼25.53 | 122.75 ▲7.28 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables
Smoke tests 75% 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 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cpt-template-path/cpt-template-path.php:25
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
- Plugin Name: Please specify the plugin name on the first line (
=== cpt-template-path ===
)
cpt-template-path/cpt-template-path.php Passed 13 tests
The main PHP file in "CPT Template Path" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
64 characters long description:
Adds Custom Post Type slug as folder path in template hierarchy.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected29 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 12 | 7 | 29 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 3.00 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 3.00 |
Average method complexity | 1.67 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.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 | 3 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 3 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 1 test
Image compression Passed 1 test
Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin