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
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.02MB] [CPU: ▼6.49ms] Passed 4 tests
A check of server-side resources used by Add Page From Template
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 40.02 ▼0.35 |
Dashboard /wp-admin | 3.33 ▲0.03 | 47.42 ▼2.52 |
Posts /wp-admin/edit.php | 3.38 ▲0.03 | 43.55 ▼5.71 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.02 | 82.40 ▼17.39 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 39.18 ▲4.98 |
Add Page From Template /wp-admin/options-general.php?page=apft-setting-admin | 3.22 | 31.05 |
Server storage [IO: ▲0.22MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
theysaidso_admin_options |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for Add Page From Template
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲58 | 13.53 ▼0.84 | 1.84 ▲0.11 | 43.52 ▼2.89 |
Dashboard /wp-admin | 2,210 ▲25 | 4.85 ▼1.14 | 102.11 ▲0.14 | 37.65 ▼4.40 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.00 ▲0.00 | 37.80 ▼3.07 | 33.91 ▲0.93 |
Add New Post /wp-admin/post-new.php | 1,537 ▼0 | 23.11 ▼0.18 | 671.77 ▲38.57 | 56.94 ▲10.22 |
Media Library /wp-admin/upload.php | 1,392 ▲10 | 4.17 ▲0.00 | 97.11 ▼1.39 | 40.73 ▼3.84 |
Add Page From Template /wp-admin/options-general.php?page=apft-setting-admin | 825 | 2.03 | 26.36 | 29.53 |
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
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 50% 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 fix the following
- 8× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-page-from-template/includes/functions.php:11
- > 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
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: 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 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 '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 just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
- Screenshots: These screenshots require images: #1 (Virtual page would be made.), #2 (Just make a page-foobar.php at your themes/pages directory.)
- Plugin Name: "Plugin Name" should be replaced with 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
The main PHP script in "Add Page From Template" version 0.4.4.1 is automatically included on every request by WordPress
41 characters long description:
Creates virtural page from template file.
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
Everything looks great! No dangerous 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
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
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% |