Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲1.09MB] [CPU: ▲3.96ms] Passed 4 tests
Analyzing server-side resources used by DeMomentSomTres Gift Ticket
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.59 ▲1.08 | 49.67 ▲5.52 |
Dashboard /wp-admin | 4.45 ▲1.06 | 57.84 ▼5.46 |
Posts /wp-admin/edit.php | 4.50 ▲1.10 | 53.22 ▲3.42 |
Add New Post /wp-admin/post-new.php | 7.03 ▲1.10 | 100.48 ▲12.35 |
Media Library /wp-admin/upload.php | 4.37 ▲1.10 | 48.82 ▲13.34 |
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins | 4.38 | 43.85 |
Server storage [IO: ▲10.08MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 327 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
can_compress_scripts |
Browser metrics Passed 4 tests
DeMomentSomTres Gift Ticket: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,827 ▲66 | 14.77 ▲0.41 | 1.74 ▼0.10 | 40.00 ▼6.35 |
Dashboard /wp-admin | 2,236 ▲62 | 5.67 ▲0.06 | 88.08 ▼5.65 | 43.89 ▲7.51 |
Posts /wp-admin/edit.php | 2,147 ▲50 | 2.18 ▲0.17 | 38.22 ▲2.34 | 37.23 ▲1.96 |
Add New Post /wp-admin/post-new.php | 1,583 ▲177 | 24.94 ▲7.20 | 618.00 ▼63.55 | 63.81 ▲5.14 |
Media Library /wp-admin/upload.php | 1,443 ▲40 | 4.17 ▲0.08 | 97.56 ▼3.89 | 47.37 ▲0.58 |
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins | 1,045 | 2.05 | 24.66 | 30.59 |
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
You still need to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested
SRP 0% 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
Almost there! Just fix the following items
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/demomentsomtres-wc-cadeau/lib/dompdf/lib/php-css-parser/tests/quickdump.php
- 193× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/demomentsomtres-wc-cadeau/lib/dompdf/src/Positioner/TableCell.php:19
- > PHP Notice
Undefined variable: fontDir in wp-content/plugins/demomentsomtres-wc-cadeau/lib/dompdf/lib/fonts/dompdf_font_family_cache.php on line 81
- > PHP Notice
Undefined variable: fontDir in wp-content/plugins/demomentsomtres-wc-cadeau/lib/dompdf/lib/fonts/dompdf_font_family_cache.php on line 39
- > PHP Fatal error
Uncaught Error: Call to undefined function did_action() in wp-content/plugins/demomentsomtres-wc-cadeau/lib/class-tgm-plugin-activation.php:1910
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\Renderer\\Block' not found in wp-content/plugins/demomentsomtres-wc-cadeau/lib/dompdf/src/Renderer/TableRowGroup.php:17
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\FrameDecorator\\AbstractFrameDecorator' not found in wp-content/plugins/demomentsomtres-wc-cadeau/lib/dompdf/src/FrameDecorator/Table.php:21
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\Value\\PrimitiveValue' not found in wp-content/plugins/demomentsomtres-wc-cadeau/lib/dompdf/lib/php-css-parser/lib/Sabberworm/CSS/Value/URL.php:6
- > PHP Fatal error
Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/demomentsomtres-wc-cadeau/lib/dompdf/lib/php-css-parser/lib/Sabberworm/CSS/Property/Charset.php:12
- > PHP Notice
Undefined variable: fontDir in wp-content/plugins/demomentsomtres-wc-cadeau/lib/dompdf/lib/fonts/dompdf_font_family_cache.php on line 71
- > PHP Fatal error
Uncaught Error: Class 'FontLib\\Header' not found in wp-content/plugins/demomentsomtres-wc-cadeau/lib/dompdf/lib/php-font-lib/src/FontLib/EOT/Header.php:21
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: all posts, category, archives
demomentsomtres-wc-cadeau/dms3-woocommerce-cadeau.php 77% from 13 tests
The principal PHP file in "DeMomentSomTres Gift Ticket" v. 202201120000... is loaded by WordPress automatically on each request
The following require your attention:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("demomentsomtres-wc-cadeau.php" instead of "dms3-woocommerce-cadeau.php")
- Version: Use periods and digits only for your plugin's version number (ex. "1.0.3" instead of "202201120000...")
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin39,047 lines of code in 249 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 192 | 8,733 | 16,642 | 36,924 |
Markdown | 7 | 276 | 0 | 942 |
CSS | 31 | 134 | 60 | 650 |
XML | 7 | 5 | 2 | 212 |
JSON | 5 | 0 | 0 | 135 |
PO File | 2 | 40 | 46 | 104 |
YAML | 4 | 16 | 3 | 63 |
HTML | 1 | 0 | 0 | 17 |
PHP code 50% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 652)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 35.61 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 765.00 |
Average method complexity | 4.29 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 652.00 |
Code structure | ||
---|---|---|
Namespaces | 33 | |
Interfaces | 5 | |
Traits | 0 | |
Classes | 185 | |
▷ Abstract classes | 12 | 6.49% |
▷ Concrete classes | 173 | 93.51% |
▷ Final classes | 0 | 0.00% |
Methods | 2,063 | |
▷ Static methods | 87 | 4.22% |
▷ Public methods | 1,760 | 85.31% |
▷ Protected methods | 208 | 10.08% |
▷ Private methods | 95 | 4.60% |
Functions | 18 | |
▷ Named functions | 3 | 16.67% |
▷ Anonymous functions | 15 | 83.33% |
Constants | 175 | |
▷ Global constants | 2 | 1.14% |
▷ Class constants | 173 | 98.86% |
▷ Public constants | 173 | 100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
lib/dompdf/lib/res/broken_image.png | 0.60KB | 0.47KB | ▼ 22.33% |