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: ▲0.30MB] [CPU: ▼9.25ms] Passed 4 tests
This is a short check of server-side resources used by Boxers and Swipers
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.79 ▲0.32 | 44.75 ▲3.43 |
Dashboard /wp-admin | 3.61 ▲0.26 | 47.89 ▼26.24 |
Posts /wp-admin/edit.php | 3.73 ▲0.37 | 53.76 ▲3.60 |
Add New Post /wp-admin/post-new.php | 6.20 ▲0.31 | 87.16 ▼16.03 |
Media Library /wp-admin/upload.php | 3.54 ▲0.30 | 38.04 ▲1.86 |
Boxers and Swipers /wp-admin/options-general.php?page=boxersandswipers | 3.50 | 34.12 |
Server storage [IO: ▲0.31MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 13 new options
New WordPress options |
---|
boxersandswipers_nivolightbox |
boxersandswipers_useragent |
can_compress_scripts |
boxersandswipers_colorbox |
widget_recent-comments |
theysaidso_admin_options |
boxersandswipers_effect |
widget_theysaidso_widget |
widget_recent-posts |
boxersandswipers_slimbox |
... |
Browser metrics Passed 4 tests
An overview of browser requirements for Boxers and Swipers
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,928 ▲157 | 13.65 ▼0.88 | 12.04 ▲10.19 | 42.32 ▼1.00 |
Dashboard /wp-admin | 2,202 ▲27 | 5.63 ▼0.08 | 91.64 ▼8.23 | 43.63 ▼3.73 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 1.99 ▼0.02 | 40.42 ▲2.89 | 37.60 ▲2.39 |
Add New Post /wp-admin/post-new.php | 1,537 ▲11 | 18.22 ▼5.54 | 585.66 ▼95.41 | 70.50 ▲18.30 |
Media Library /wp-admin/upload.php | 1,407 ▲7 | 4.20 ▼0.02 | 94.63 ▼13.27 | 42.65 ▼6.44 |
Boxers and Swipers /wp-admin/options-general.php?page=boxersandswipers | 2,841 | 2.00 | 24.67 | 29.21 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected
SRP 50% 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
- 4× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/boxers-and-swipers/lib/class-boxersandswipersadmin.php:39
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/boxers-and-swipers/lib/class-boxersandswipersregist.php:37
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/boxers-and-swipers/lib/class-boxersandswipersregist.php:37
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/boxers-and-swipers/lib/class-boxersandswipers.php:45
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% 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
9 plugin tags: nivolightbox, useragent, colorbox, images, smartphone...
boxers-and-swipers/boxersandswipers.php 92% from 13 tests
The entry point to "Boxers and Swipers" version 4.02 is a PHP file that has certain tags in its header comment area
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 ("boxers-and-swipers.php" instead of "boxersandswipers.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected4,562 lines of code in 30 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 138 | 266 | 2,227 |
CSS | 7 | 140 | 127 | 949 |
JavaScript | 15 | 128 | 206 | 915 |
Sass | 1 | 120 | 1 | 467 |
Markdown | 1 | 1 | 0 | 3 |
SVG | 1 | 0 | 0 | 1 |
PHP code 50% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 109)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 91.33 |
▷ Minimum class complexity | 12.00 |
▷ Maximum class complexity | 208.00 |
Average method complexity | 13.32 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 109.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 | 22 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 15 | 68.18% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 7 | 31.82% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
11 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
nivolightbox/themes/default/next.png | 3.12KB | 0.32KB | ▼ 89.60% |
colorbox/images/controls.png | 2.83KB | 1.28KB | ▼ 54.82% |
colorbox/images/overlay.png | 0.18KB | 0.15KB | ▼ 15.93% |
nivolightbox/themes/default/close.png | 2.88KB | 0.24KB | ▼ 91.76% |
nivolightbox/themes/default/next@2x.png | 4.14KB | 0.98KB | ▼ 76.27% |