Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.07MB] [CPU: ▼300.12ms] Passed 4 tests
Server-side resources used by Add Page From Template
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.67 ▲0.15 | 52.93 ▲2.75 |
Dashboard /wp-admin | 3.52 ▲0.10 | 38.80 ▼5.69 |
Posts /wp-admin/edit.php | 3.74 ▲0.10 | 38.82 ▼6.15 |
Add New Post /wp-admin/post-new.php | 6.98 ▲0.00 | 106.25 ▼1,191.37 |
Media Library /wp-admin/upload.php | 3.39 ▲0.09 | 64.03 ▲38.22 |
Add Page From Template /wp-admin/options-general.php?page=apft-setting-admin | 3.36 | 25.35 |
Server storage [IO: ▲0.22MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for Add Page From Template
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,788 ▲43 | 15.83 ▲0.48 | 6.39 ▲0.40 | 2.11 ▼0.63 |
Dashboard /wp-admin | 2,890 ▲29 | 6.06 ▼0.11 | 147.44 ▲8.86 | 169.32 ▼2.49 |
Posts /wp-admin/edit.php | 2,690 ▲5 | 3.24 ▲0.01 | 63.07 ▼5.32 | 218.49 ▲65.61 |
Add New Post /wp-admin/post-new.php | 1,714 ▲24 | 20.89 ▲0.31 | 510.83 ▲62.72 | 166.39 ▲7.73 |
Media Library /wp-admin/upload.php | 1,703 ▲2 | 5.52 ▼0.01 | 158.50 ▲16.51 | 209.80 ▲9.29 |
Add Page From Template /wp-admin/options-general.php?page=apft-setting-admin | 1,073 | 2.38 | 57.51 | 127.55 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully
Smoke tests 75% 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 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
- 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/add-page-from-template/tests/bootstrap.php on line 12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-page-from-template/includes/functions.php:11
- > PHP Warning
require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/add-page-from-template/tests/bootstrap.php on line 12
- > PHP Fatal error
Uncaught Error: Class 'AP_Enum' not found in wp-content/plugins/add-page-from-template/includes/class-templatestatus.php:9
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/add-page-from-template/tests/test-sample.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/add-page-from-template/tests/pages/page-hoge.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/add-page-from-template/add-page-from-template.php:18
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/add-page-from-template/tests/test-loader.php:9
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Virtual page would be made.), #2 (Just make a page-foobar.php at your themes/pages directory.)
- Plugin Name: You should set the name of your plugin on the first line (
=== add-page-from-template ===
)
add-page-from-template/add-page-from-template.php Passed 13 tests
"Add Page From Template" version 0.4.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
41 characters long description:
Creates virtural page from template file.
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 plugin768 lines of code in 15 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 139 | 307 | 618 |
Bourne Shell | 1 | 21 | 6 | 91 |
PO File | 1 | 10 | 12 | 45 |
XML | 1 | 0 | 0 | 14 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.20 |
Average class complexity | 5.44 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 15.00 |
Average method complexity | 1.75 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 1 | 11.11% |
▷ Concrete classes | 8 | 88.89% |
▷ Final classes | 2 | 25.00% |
Methods | 53 | |
▷ Static methods | 11 | 20.75% |
▷ Public methods | 40 | 75.47% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 13 | 24.53% |
Functions | 8 | |
▷ Named functions | 2 | 25.00% |
▷ Anonymous functions | 6 | 75.00% |
Constants | 5 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 5 | 100.00% |
▷ Public constants | 5 | 100.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
2 PNG files occupy 0.18MB with 0.13MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 41.80KB | 11.83KB | ▼ 71.70% |
screenshot-1.png | 139.46KB | 39.96KB | ▼ 71.35% |