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
Install script ran successfully
Server metrics [RAM: ▲0.05MB] [CPU: ▼147.47ms] Passed 4 tests
Server-side resources used by PDPA Consent for Thailand
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.72 ▲0.01 | 27.96 ▲2.81 |
Dashboard /wp-admin | 3.13 ▲0.08 | 49.78 ▼2.82 |
Posts /wp-admin/edit.php | 3.18 ▲0.08 | 47.76 ▲3.28 |
Add New Post /wp-admin/post-new.php | 5.48 ▲0.05 | 91.60 ▼593.13 |
Media Library /wp-admin/upload.php | 3.08 ▲0.08 | 42.48 ▲6.38 |
Server storage [IO: ▲0.89MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 2 new options
New WordPress options |
---|
pdpa-consent-user_privacy-page |
Activated_Plugin |
Browser metrics Passed 4 tests
A check of browser resources used by PDPA Consent for Thailand
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,780 ▲184 | 16.19 ▲0.49 | 9.62 ▲0.39 | 49.80 ▼6.76 |
Dashboard /wp-admin | 3,034 ▲97 | 6.52 ▲0.59 | 146.93 ▼13.00 | 109.28 ▼13.93 |
Posts /wp-admin/edit.php | 2,807 ▲68 | 3.00 ▲0.31 | 68.37 ▲0.41 | 114.17 ▲21.48 |
Add New Post /wp-admin/post-new.php | 1,730 ▲126 | 18.56 ▼0.20 | 379.82 ▼52.03 | 111.96 ▼10.93 |
Media Library /wp-admin/upload.php | 1,872 ▲65 | 5.40 ▲0.39 | 145.49 ▼16.56 | 129.09 ▼1.58 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
- Zombie WordPress options were found after uninstall: 2 options
- pdpa-consent-user_privacy-page
- Activated_Plugin
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% 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
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/pdpa-consent/pdpa-consent.php
- 4× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/pdpa-consent/includes/frontends/user_template.php:30
- > PHP Fatal error
Uncaught Error: Call to undefined function get_avatar() in wp-content/plugins/pdpa-consent/includes/user_template.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/pdpa-consent/includes/frontends/consent_template.php:1
- > PHP Notice
Undefined variable: is_login in wp-content/plugins/pdpa-consent/includes/frontends/user_template.php on line 2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% 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:
- Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
pdpa-consent/pdpa-consent.php Passed 13 tests
"PDPA Consent for Thailand" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
101 characters long description:
PDPA Consent allows you to notify to the user to accept privacy terms. Comply with Thailand PDPA law.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected1,537 lines of code in 26 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 84 | 95 | 780 |
PO File | 2 | 102 | 138 | 262 |
CSS | 5 | 24 | 10 | 219 |
Markdown | 3 | 47 | 0 | 154 |
JavaScript | 6 | 9 | 7 | 74 |
HTML | 1 | 2 | 12 | 47 |
YAML | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 20.00 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 37.00 |
Average method complexity | 2.12 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 10.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 51 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 49 | 96.08% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 3.92% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.41MB with 0.25MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/pdpa-consent-banner.png | 419.82KB | 165.61KB | ▼ 60.55% |