Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.12MB] [CPU: ▼4.52ms] Passed 4 tests
This is a short check of server-side resources used by FancyBox for WordPress
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.60 ▲0.13 | 39.94 ▼3.18 |
Dashboard /wp-admin | 3.43 ▲0.12 | 50.92 ▲4.53 |
Posts /wp-admin/edit.php | 3.54 ▲0.18 | 46.85 ▼2.43 |
Add New Post /wp-admin/post-new.php | 6.01 ▲0.12 | 84.19 ▼14.56 |
Media Library /wp-admin/upload.php | 3.35 ▲0.12 | 35.33 ▲2.08 |
Fancybox for WP /wp-admin/options-general.php?page=fancybox-for-wordpress | 3.41 | 33.11 |
Server storage [IO: ▲1.13MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 51 new files
Database: no new tables, 9 new options
New WordPress options |
---|
mfbfw_active_version |
db_upgraded |
mfbfw-rate-time |
widget_theysaidso_widget |
widget_recent-comments |
mfbfw |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
FancyBox for WordPress: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,898 ▲152 | 14.16 ▼0.02 | 11.76 ▲10.05 | 44.46 ▼0.92 |
Dashboard /wp-admin | 2,213 ▲22 | 4.82 ▼0.07 | 101.89 ▼5.57 | 39.37 ▼5.40 |
Posts /wp-admin/edit.php | 2,090 ▲1 | 1.99 ▲0.00 | 35.23 ▼1.25 | 33.11 ▲2.03 |
Add New Post /wp-admin/post-new.php | 1,545 ▲26 | 18.31 ▼5.03 | 603.57 ▼87.14 | 52.28 ▼15.07 |
Media Library /wp-admin/upload.php | 1,392 ▲10 | 4.17 ▲0.02 | 97.17 ▼3.44 | 42.11 ▲0.70 |
Fancybox for WP /wp-admin/options-general.php?page=fancybox-for-wordpress | 3,464 | 5.33 | 111.47 | 111.04 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
- This plugin does not fully uninstall, leaving 9 options in the database
- widget_recent-posts
- mfbfw
- db_upgraded
- theysaidso_admin_options
- mfbfw_active_version
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-comments
- mfbfw-rate-time
Smoke tests 75% 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 50% 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
Almost there! Just fix the following items
- 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fancybox-for-wordpress/lib/admin-head.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/fancybox-for-wordpress/fancybox.php:40
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/fancybox-for-wordpress/lib/admin-tab-appearance.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/fancybox-for-wordpress/lib/admin-tab-behaviour.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/fancybox-for-wordpress/lib/admin-tab-animations.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/fancybox-for-wordpress/lib/admin-tab-galleries.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/fancybox-for-wordpress/class-fancybox-review.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/fancybox-for-wordpress/lib/admin-tab-support.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/fancybox-for-wordpress/lib/admin-tab-other.php:1
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Simple example of fancybox on a post. [Live demo here](http://blog.moskis.net/2012/01/20/teclado-apple-en-windows-7/)), #2 (Basic settings on Options Page in the Admin Panel. This makes it very easy to customize the plugin to your needs)
- Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
fancybox-for-wordpress/fancybox.php 85% from 13 tests
The main file in "FancyBox for WordPress" v. 3.3.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("fancybox-for-wordpress.php" instead of "fancybox.php")
- 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 Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected8,280 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 2 | 1,208 | 652 | 3,923 |
PHP | 10 | 189 | 108 | 1,543 |
PO File | 4 | 520 | 732 | 1,514 |
CSS | 3 | 214 | 58 | 1,300 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.51 |
Average class complexity | 10.00 |
▷ Minimum class complexity | 10.00 |
▷ Maximum class complexity | 10.00 |
Average method complexity | 2.12 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 5.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 8 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 6 | 75.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 25.00% |
Functions | 13 | |
▷ Named functions | 13 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 7 | |
▷ Global constants | 7 | 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
21 compressed PNG files occupy 0.47MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/fancy_nav_left.png | 1.41KB | 1.64KB | 0.00% |
assets/images/fancy_shadow_s.png | 0.11KB | 0.19KB | 0.00% |
assets/images/fancy_shadow_ne.png | 0.34KB | 0.48KB | 0.00% |
assets/images/fancybox-y.png | 0.17KB | 0.24KB | 0.00% |
assets/images/fancy_close.png | 1.48KB | 1.73KB | 0.00% |