Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully
Server metrics [RAM: ▼0.62MB] [CPU: ▼31.23ms] Passed 4 tests
Analyzing server-side resources used by Twinfield
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.60 ▲0.14 | 41.96 ▲4.00 |
Dashboard /wp-admin | 3.32 ▲0.02 | 25.15 ▼29.97 |
Posts /wp-admin/edit.php | 3.33 ▼0.03 | 24.46 ▼22.18 |
Add New Post /wp-admin/post-new.php | 3.32 ▼2.56 | 25.03 ▼64.83 |
Media Library /wp-admin/upload.php | 3.32 ▲0.10 | 27.49 ▼7.93 |
Documentation /wp-admin/admin.php?page=twinfield_documentation | 3.33 | 27.42 |
Settings /wp-admin/admin.php?page=twinfield_settings | 3.33 | 30.39 |
Twinfield /wp-admin/admin.php?page=twinfield | 3.33 | 26.34 |
Customers /wp-admin/admin.php?page=twinfield_customers | 3.33 | 30.79 |
Invoices /wp-admin/admin.php?page=twinfield_invoices | 3.33 | 25.34 |
Server storage [IO: ▲0.31MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 78 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
widget_recent-comments |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
can_compress_scripts |
Browser metrics Passed 4 tests
Twinfield: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,840 ▲94 | 14.45 ▲0.21 | 1.78 ▼1.05 | 43.66 ▲2.40 |
Dashboard /wp-admin | 2,246 ▲55 | 5.87 ▲0.99 | 101.85 ▲2.42 | 61.59 ▲23.34 |
Posts /wp-admin/edit.php | 2,126 ▲34 | 1.97 ▼0.05 | 33.55 ▼2.97 | 32.57 ▼0.90 |
Add New Post /wp-admin/post-new.php | 1,552 ▲19 | 22.95 ▼0.18 | 734.04 ▲34.34 | 53.61 ▲1.91 |
Media Library /wp-admin/upload.php | 1,422 ▲40 | 4.17 ▼0.04 | 95.98 ▼4.50 | 76.13 ▲34.05 |
Documentation /wp-admin/admin.php?page=twinfield_documentation | 1,173 | 2.14 | 31.57 | 37.71 |
Settings /wp-admin/admin.php?page=twinfield_settings | 951 | 2.02 | 25.48 | 30.18 |
Twinfield /wp-admin/admin.php?page=twinfield | 850 | 2.01 | 25.26 | 24.29 |
Customers /wp-admin/admin.php?page=twinfield_customers | 818 | 2.06 | 25.85 | 25.02 |
Invoices /wp-admin/admin.php?page=twinfield_invoices | 818 | 2.06 | 24.57 | 25.85 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- Uninstall procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/twinfield/classes/Pronamic/WP/TwinfieldPlugin/Settings.php+36
Function create_function() is deprecated
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
- 15 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=twinfield_invoices
- > Deprecated in wp-content/plugins/twinfield/classes/Pronamic/WP/TwinfieldPlugin/Settings.php+170
Function create_function() is deprecated
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/twinfield/views/Pronamic/WP/Merge/Customer/create_response.php
- 28× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/twinfield/templates/invoice.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/twinfield/views/section-permalinks.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/twinfield/views/page-twinfield.php:2
- > PHP Fatal error
Uncaught Error: Class 'Pronamic\\WP\\Twinfield\\FormBuilder\\Form\\ParentForm' not found in wp-content/plugins/twinfield/classes/Pronamic/WP/Twinfield/FormBuilder/Form/Invoice.php:5
- > PHP Fatal error
Uncaught Error: Class 'Pronamic\\WP\\Twinfield\\Merge\\Supports\\BaseSupport' not found in wp-content/plugins/twinfield/classes/Pronamic/WP/Twinfield/Merge/Supports/Customer.php:24
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/twinfield/views/Pronamic/WP/FormBuilder/create_form_customer.php:9
- > PHP Fatal error
Uncaught Error: Class 'Pronamic\\Twinfield\\Request\\Read\\Read' not found in wp-content/plugins/twinfield/twinfield/src/Pronamic/Twinfield/Request/Read/Invoice.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/twinfield/views/page-documentation.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/twinfield/views/meta-box-customer.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/twinfield/views/Pronamic/WP/FormBuilder/create_form_invoice.php:1
- > 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)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: administration, twinfield
twinfield/twinfield.php Passed 13 tests
The primary PHP file in "Twinfield" version 1.1.0 is used by WordPress to initiate all plugin functionality
80 characters long description:
A base plugin to make the connection with the Twinfield administration software.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin4,470 lines of code in 73 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 68 | 1,068 | 1,872 | 3,877 |
PO File | 1 | 183 | 831 | 341 |
XSLT | 1 | 20 | 0 | 112 |
Markdown | 1 | 50 | 0 | 108 |
JSON | 1 | 0 | 0 | 18 |
CSS | 1 | 5 | 0 | 14 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.16 |
Average class complexity | 4.53 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 18.00 |
Average method complexity | 1.52 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 14.00 |
Code structure | ||
---|---|---|
Namespaces | 22 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 49 | |
▷ Abstract classes | 5 | 10.20% |
▷ Concrete classes | 44 | 89.80% |
▷ Final classes | 0 | 0.00% |
Methods | 336 | |
▷ Static methods | 13 | 3.87% |
▷ Public methods | 325 | 96.73% |
▷ Protected methods | 2 | 0.60% |
▷ Private methods | 9 | 2.68% |
Functions | 11 | |
▷ Named functions | 11 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/admin/images/icon-32x32.png | 0.77KB | 0.44KB | ▼ 42.17% |
assets/admin/images/icon-16x16.png | 0.41KB | 0.27KB | ▼ 32.94% |