Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▼0.58MB] [CPU: ▼16.04ms] Passed 4 tests
An overview of server-side resources used by CPTRP
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.10 | 40.17 ▼1.82 |
Dashboard /wp-admin | 3.42 ▲0.11 | 48.50 ▼1.13 |
Posts /wp-admin/edit.php | 3.53 ▲0.17 | 47.30 ▲2.94 |
Add New Post /wp-admin/post-new.php | 3.27 ▼2.62 | 35.42 ▼60.82 |
Media Library /wp-admin/upload.php | 3.34 ▲0.11 | 35.67 ▼0.40 |
CPTRP /wp-admin/options-general.php?page=cptrp | 3.30 | 30.64 |
Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
db_upgraded |
widget_recent-comments |
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Checking browser requirements for CPTRP
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,808 ▲62 | 13.17 ▼1.20 | 1.81 ▼0.35 | 42.57 ▼0.34 |
Dashboard /wp-admin | 2,214 ▲23 | 4.83 ▼0.08 | 112.64 ▲8.52 | 42.95 ▲1.36 |
Posts /wp-admin/edit.php | 2,079 ▼10 | 2.04 ▲0.07 | 34.33 ▼4.26 | 32.80 ▼1.61 |
Add New Post /wp-admin/post-new.php | 1,521 ▲1 | 23.08 ▼0.37 | 692.40 ▼12.93 | 56.69 ▼11.32 |
Media Library /wp-admin/upload.php | 1,396 ▲8 | 4.27 ▲0.00 | 97.19 ▼15.08 | 40.97 ▼2.24 |
CPTRP /wp-admin/options-general.php?page=cptrp | 697 | 1.53 | 6.39 | 24.58 |
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
The following items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
- > GET request to /wp-admin/options-general.php?page=cptrp
- > Error in wp-admin/includes/template.php+1801
Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/cptrp/admin/templates/settings.php on line 8 and exactly 2 expected in wp-admin/includes/template.php:1801
Stack trace:
#0 wp-content/plugins/cptrp/admin/templates/settings.php(8): do_settings_fields()
#1 wp-content/plugins/cptrp/admin/settings.php(287): include('/var/www/wordpr...')
#2 wp-includes/class-wp-hook.php(310): cptrp_settings->cptrp_plugin_settings_page()
#3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#4 wp-includes/plugin.php(517): WP_Hook->do_action()
#5 wp-admin/admin.php(259): do_action()
#6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
#7 {main}
thrown
SRP 0% 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
The following issues need your attention
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/cptrp/public/partials/cptrp-public-display.php
- > /wp-content/plugins/cptrp/admin/partials/cptrp-admin-display.php
- 1× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/cptrp/admin/templates/settings.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: related post, custom post type, post
cptrp/cptrp.php Passed 13 tests
The primary PHP file in "CPTRP" version 1.0.0 is used by WordPress to initiate all plugin functionality
41 characters long description:
Adding related posts to custom post type.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin587 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 14 | 312 | 599 | 511 |
PO File | 1 | 14 | 14 | 50 |
CSS | 2 | 5 | 8 | 20 |
JavaScript | 2 | 4 | 54 | 6 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.19 |
Average class complexity | 5.25 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 15.00 |
Average method complexity | 1.85 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 12.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 40 | |
▷ Static methods | 2 | 5.00% |
▷ Public methods | 35 | 87.50% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 12.50% |
Functions | 4 | |
▷ Named functions | 4 | 100.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 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin