Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
- This plugin did not install gracefully
- > Deprecated in wp-content/plugins/cairn/includes/gpg/globals.php+219
Methods with the same name as their class will not be constructors in a future version of PHP; bdiv has a deprecated constructor
Server metrics [RAM: ▲0.04MB] [CPU: ▼3.22ms] Passed 4 tests
This is a short check of server-side resources used by Cairn
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.23 ▼0.23 | 44.15 ▲0.84 |
Dashboard /wp-admin | 3.59 ▲0.29 | 60.85 ▲6.17 |
Posts /wp-admin/edit.php | 3.61 ▲0.26 | 56.82 ▲3.08 |
Add New Post /wp-admin/post-new.php | 5.74 ▼0.14 | 80.09 ▼22.98 |
Media Library /wp-admin/upload.php | 3.51 ▲0.28 | 46.03 ▲8.11 |
Server storage [IO: ▲3.54MB] [DB: ▼0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 238 new files
Database: 3 new tables, 7 new options
New tables |
---|
wp_posts_set_btc_addresses |
wp_posts_set_relationships |
wp_posts_set |
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
bitcoin_exchange_rates |
widget_recent-comments |
db_upgraded |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Cairn
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,578 ▼168 | 14.25 ▼0.02 | 28.85 ▲26.99 | 3.66 ▼38.56 |
Dashboard /wp-admin | 2,221 ▲44 | 5.67 ▲0.01 | 98.79 ▲9.19 | 42.95 ▼3.74 |
Posts /wp-admin/edit.php | 2,123 ▲20 | 2.08 ▲0.12 | 37.66 ▼5.53 | 37.06 ▼2.21 |
Add New Post /wp-admin/post-new.php | 1,830 ▲293 | 21.26 ▲2.91 | 646.18 ▲5.16 | 73.88 ▲6.80 |
Media Library /wp-admin/upload.php | 1,423 ▲29 | 4.30 ▲0.13 | 111.22 ▲10.69 | 54.33 ▲7.58 |
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
You still need to fix the following
- Zombie tables detected upon uninstall: 3 tables
- wp_posts_set_relationships
- wp_posts_set
- wp_posts_set_btc_addresses
- This plugin did not uninstall successfully, leaving 7 options in the database
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
- bitcoin_exchange_rates
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
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 take a closer look at the following
- 3× PHP files output text when accessed directly:
- > /wp-content/plugins/cairn/includes/phpqrcode/index.php
- > /wp-content/plugins/cairn/includes/stripe/test/Stripe.php
- > /wp-content/plugins/cairn/views/404.php
- 112× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/cairn/views/fineart.php on line 15
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/cairn/views/post.php on line 9
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/cairn/views/fineart.php on line 20
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/cairn/views/fineart.php on line 15
- > PHP Fatal error
Uncaught Error: Class 'StripeTestCase' not found in wp-content/plugins/cairn/includes/stripe/test/Stripe/BalanceTransactionTest.php:3
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/cairn/views/fineart.php on line 15
- > PHP Warning
file_put_contents(wp-content/plugins/cairn/includes/phpqrcode/cache/mask_2/mask_21_2.dat): failed to open stream: No such file or directory in /var/www/wordpress/wp-content/plugins/cairn/includes/phpqrcode/qrmask.php on line 155
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/cairn/views/portfolio.php on line 14
- > PHP Fatal error
Uncaught Error: Class 'StripeTestCase' not found in wp-content/plugins/cairn/includes/stripe/test/Stripe/InvoiceTest.php:3
- > PHP Notice
Undefined variable: item in wp-content/plugins/cairn/views/fineart.php on line 20
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
- Tags: Please reduce the number of tags, currently 24 tag instead of maximum 10
cairn/cairn.php Passed 13 tests
"Cairn" version 0.1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
29 characters long description:
Art Exhibition Gallery & Shop
Code Analysis 5% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Please fix the following items
- Do not include executable or dangerous files in your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/cairn/includes/stripe/lib/data/ca-certificates.crt
- .bat - Batch File in Windows
- ☣ wp-content/plugins/cairn/includes/phpqrcode/tools/merge.bat
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
SVG | 10 | 0 | 0 | 18,307 |
PHP | 117 | 4,469 | 4,084 | 17,269 |
JavaScript | 13 | 1,087 | 942 | 3,601 |
CSS | 4 | 98 | 3 | 2,675 |
EJS | 21 | 335 | 0 | 1,374 |
JSON | 2 | 1 | 0 | 257 |
YAML | 1 | 3 | 0 | 9 |
Markdown | 1 | 3 | 0 | 7 |
Bourne Shell | 1 | 0 | 0 | 2 |
DOS Batch | 1 | 0 | 0 | 2 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 22.65 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 292.00 |
Average method complexity | 3.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 65.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 6 | |
Traits | 0 | |
Classes | 113 | |
▷ Abstract classes | 5 | 4.42% |
▷ Concrete classes | 108 | 95.58% |
▷ Final classes | 0 | 0.00% |
Methods | 908 | |
▷ Static methods | 437 | 48.13% |
▷ Public methods | 756 | 83.26% |
▷ Protected methods | 138 | 15.20% |
▷ Private methods | 14 | 1.54% |
Functions | 13 | |
▷ Named functions | 13 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 152 | |
▷ Global constants | 151 | 99.34% |
▷ Class constants | 1 | 0.66% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
19 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
static/images/creative_commons_icons.png | 8.64KB | 5.35KB | ▼ 38.08% |
static/images/secure_inv.png | 0.25KB | 0.31KB | 0.00% |
static/images/play-buttons-pair.png | 10.16KB | 4.38KB | ▼ 56.88% |
static/images/info.png | 0.70KB | 0.70KB | 0.00% |
static/images/portfolio_icon_hover.png | 0.68KB | 0.60KB | ▼ 11.35% |