Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.17MB] [CPU: ▼1.66ms] Passed 4 tests
Server-side resources used by Turtle Ad Network
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.76 ▲0.30 | 45.00 ▲2.08 |
Dashboard /wp-admin | 3.46 ▲0.16 | 51.68 ▼4.15 |
Posts /wp-admin/edit.php | 3.58 ▲0.22 | 52.23 ▲6.66 |
Add New Post /wp-admin/post-new.php | 6.04 ▲0.16 | 85.53 ▼11.23 |
Media Library /wp-admin/upload.php | 3.38 ▲0.16 | 40.27 ▲7.52 |
Ad Segments /wp-admin/admin.php?page=tan-add-ad-slots | 3.39 | 38.23 |
Wallet Address /wp-admin/admin.php?page=tan-add-wallet-address | 3.37 | 33.77 |
Settings /wp-admin/admin.php?page=tan-settings | 3.40 | 33.61 |
Ad Manager /wp-admin/admin.php?page=tan-approve-ad | 3.40 | 35.88 |
Server storage [IO: ▲0.11MB] [DB: ▲0.01MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 33 new files
Database: 5 new tables, 8 new options
New tables |
---|
wp_tan_adsegment |
wp_tan_min_amount_txid |
wp_tan_ads_size |
wp_tan_wallet_address |
wp_tan_ad_segment_details |
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
widget_theysaidso_widget |
tadn_jal_db_version |
theysaidso_admin_options |
db_upgraded |
api_server |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for Turtle Ad Network
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,835 ▲64 | 13.21 ▼1.11 | 1.61 ▼0.26 | 36.22 ▼5.71 |
Dashboard /wp-admin | 2,244 ▲59 | 5.88 ▲1.01 | 106.05 ▲2.57 | 41.10 ▼0.57 |
Posts /wp-admin/edit.php | 2,124 ▲32 | 2.03 ▲0.04 | 39.35 ▼0.79 | 35.77 ▼0.97 |
Add New Post /wp-admin/post-new.php | 1,561 ▲19 | 23.35 ▼1.41 | 660.44 ▼105.61 | 61.39 ▲4.47 |
Media Library /wp-admin/upload.php | 1,417 ▲29 | 4.24 ▼0.07 | 100.53 ▲0.15 | 40.80 ▼0.55 |
Ad Segments /wp-admin/admin.php?page=tan-add-ad-slots | 926 | 2.06 | 23.21 | 25.98 |
Wallet Address /wp-admin/admin.php?page=tan-add-wallet-address | 871 | 2.04 | 23.53 | 25.30 |
Settings /wp-admin/admin.php?page=tan-settings | 1,005 | 2.16 | 22.36 | 25.24 |
Ad Manager /wp-admin/admin.php?page=tan-approve-ad | 875 | 2.02 | 23.24 | 24.15 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- The plugin did not uninstall successfully, leaving 5 tables in the database
- wp_tan_min_amount_txid
- wp_tan_ads_size
- wp_tan_wallet_address
- wp_tan_adsegment
- wp_tan_ad_segment_details
- This plugin did not uninstall successfully, leaving 8 options in the database
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- api_server
- widget_recent-posts
- tadn_jal_db_version
- theysaidso_admin_options
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=tan-add-wallet-address
- > Notice in wp-content/plugins/turtle-ad-network/includes/add-wallet-address.php+75
Undefined variable: labell
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=tan-add-ad-slots
- > Notice in wp-content/plugins/turtle-ad-network/includes/add-ad-slots.php+107
Undefined variable: size_id_db
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=tan-add-wallet-address
- > Notice in wp-content/plugins/turtle-ad-network/includes/add-wallet-address.php+82
Undefined variable: id
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=tan-add-wallet-address
- > Notice in wp-content/plugins/turtle-ad-network/includes/add-wallet-address.php+87
Undefined variable: btntxt
- > GET request to /wp-admin/admin.php?page=tan-add-wallet-address
- > Notice in wp-content/plugins/turtle-ad-network/includes/add-wallet-address.php+79
Undefined variable: addresss
- > GET request to /wp-admin/admin.php?page=tan-settings
- > Notice in wp-content/plugins/turtle-ad-network/includes/ad-settings.php+180
Undefined variable: selected_tn
- > GET request to /wp-admin/admin.php?page=tan-settings
- > Notice in wp-content/plugins/turtle-ad-network/includes/ad-settings.php+181
Undefined variable: selected_tusd
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 perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/turtle-ad-network/base58php/vendor/kevinlebrun/colors.php/example.php
- 578× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/turtle-ad-network/base58php/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageNotProtectedTest.php:2
- > PHP Fatal error
Uncaught Error: Class 'Prophecy\\Exception\\Doubler\\DoubleException' not found in wp-content/plugins/turtle-ad-network/base58php/vendor/phpspec/prophecy/src/Prophecy/Exception/Doubler/ReturnByReferenceException.php:14
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/turtle-ad-network/base58php/vendor/phpunit/phpunit/tests/_files/ExceptionInAssertPostConditionsTest.php:2
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_Constraint' not found in wp-content/plugins/turtle-ad-network/base58php/vendor/phpunit/phpunit/src/Framework/Constraint/Composite.php:14
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_Constraint' not found in wp-content/plugins/turtle-ad-network/base58php/vendor/phpunit/phpunit/src/Framework/Constraint/Count.php:14
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/turtle-ad-network/base58php/vendor/phpunit/php-token-stream/tests/Token/FunctionTest.php:23
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/turtle-ad-network/base58php/vendor/phpunit/php-token-stream/tests/Token/ClosureTest.php:23
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/turtle-ad-network/base58php/vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php:14
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_Assert' not found in wp-content/plugins/turtle-ad-network/base58php/vendor/phpunit/phpunit/src/ForwardCompatibility/Assert.php:15
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/turtle-ad-network/base58php/vendor/phpunit/php-code-coverage/tests/_files/NamespaceCoverageCoversClassTest.php:5
- > 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 errors were detected
Optimizations
Plugin configuration 93% 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 require attention:
- Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line (
=== Turtle Ad Network===
)
turtle-ad-network/turtle-ad-network.php 92% from 13 tests
Analyzing the main PHP file in "Turtle Ad Network" version 1.0.13
Please take the time to fix the following:
- Git Repository: A Git repository was detected inside this plugin
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Almost there! Just fix the following issues
- You should never include executable (binary) or otherwise dangerous files in your plugin
- .bat - Batch File in Windows
- ☣ wp-content/plugins/turtle-ad-network/base58php/bin/athletic.bat
- ☣ wp-content/plugins/turtle-ad-network/base58php/bin/phpunit.bat
- .bat - Batch File in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 972 | 13,549 | 28,588 | 60,326 |
YAML | 48 | 211 | 89 | 3,578 |
Markdown | 50 | 1,305 | 0 | 2,751 |
JSON | 32 | 12 | 0 | 2,468 |
XML | 43 | 86 | 11 | 916 |
C | 1 | 152 | 32 | 756 |
Ant | 10 | 91 | 0 | 573 |
SVG | 1 | 0 | 0 | 288 |
XSD | 1 | 0 | 0 | 264 |
C/C++ Header | 2 | 35 | 46 | 122 |
CSS | 3 | 26 | 4 | 98 |
reStructuredText | 1 | 70 | 78 | 62 |
m4 | 1 | 11 | 11 | 41 |
JavaScript | 7 | 5 | 21 | 20 |
Bourne Shell | 2 | 6 | 2 | 12 |
DOS Batch | 2 | 0 | 0 | 8 |
PHP code 50% from 2 tests
This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 154)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 6.18 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 252.00 |
Average method complexity | 2.28 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 154.00 |
Code structure | ||
---|---|---|
Namespaces | 83 | |
Interfaces | 76 | |
Traits | 2 | |
Classes | 945 | |
▷ Abstract classes | 31 | 3.28% |
▷ Concrete classes | 914 | 96.72% |
▷ Final classes | 54 | 5.91% |
Methods | 4,240 | |
▷ Static methods | 461 | 10.87% |
▷ Public methods | 3,584 | 84.53% |
▷ Protected methods | 342 | 8.07% |
▷ Private methods | 314 | 7.41% |
Functions | 284 | |
▷ Named functions | 173 | 60.92% |
▷ Anonymous functions | 111 | 39.08% |
Constants | 117 | |
▷ Global constants | 13 | 11.11% |
▷ Class constants | 104 | 88.89% |
▷ Public constants | 104 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/imgs/11.png | 9.70KB | 7.02KB | ▼ 27.67% |
includes/imgs/1.png | 0.76KB | 0.84KB | 0.00% |
includes/imgs/1 (1).png | 0.64KB | 0.64KB | 0.15% |
includes/imgs/1 (2).png | 2.17KB | 2.11KB | ▼ 2.97% |