Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/add-image-maps/includes/class-add-img-maps-activator.php+24
Non-static method Add_Img_Maps::get_plugin_name() should not be called statically
Server metrics [RAM: ▼2.25MB] [CPU: ▼345.45ms] Passed 4 tests
A check of server-side resources used by Add Image Maps
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.11 ▼1.40 | 5.76 ▼43.08 |
Dashboard /wp-admin | 2.13 ▼1.27 | 5.18 ▼29.52 |
Posts /wp-admin/edit.php | 2.13 ▼1.50 | 5.08 ▼36.40 |
Add New Post /wp-admin/post-new.php | 2.13 ▼4.84 | 6.24 ▼1,272.80 |
Media Library /wp-admin/upload.php | 2.13 ▼1.16 | 5.00 ▼19.20 |
Add Image Maps /wp-admin/options-general.php?page=add-img-maps | 2.13 | 5.72 |
Server storage [IO: ▲0.15MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
This is an overview of browser requirements for Add Image Maps
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,769 ▲27 | 15.94 ▲0.28 | 5.83 ▼0.69 | 3.02 ▲1.07 |
Dashboard /wp-admin | 2,893 ▲32 | 6.08 ▼0.03 | 117.83 ▼15.58 | 154.96 ▼4.68 |
Posts /wp-admin/edit.php | 2,693 ▲2 | 3.24 ▲0.00 | 62.19 ▼1.72 | 141.52 ▼3.00 |
Add New Post /wp-admin/post-new.php | 1,664 ▼32 | 15.75 ▼5.29 | 391.39 ▼19.08 | 166.87 ▲16.05 |
Media Library /wp-admin/upload.php | 1,700 ▲2 | 5.54 ▲0.01 | 154.27 ▲15.36 | 189.71 ▲0.78 |
Add Image Maps /wp-admin/options-general.php?page=add-img-maps | 1,154 | 2.37 | 54.37 | 100.78 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- This plugin did not uninstall without warnings or errors
- > Deprecated in wp-content/plugins/add-image-maps/includes/class-add-img-maps-i18n.php+25
Non-static method Add_Img_Maps::name() should not be called statically
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
- > GET request to /wp-admin/options-general.php?page=add-img-maps
- > Deprecated in wp-content/plugins/add-image-maps/includes/class-add-img-maps-i18n.php+25
Non-static method Add_Img_Maps::name() should not be called statically
- 5 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=add-img-maps
- > Notice in wp-content/plugins/add-image-maps/admin/partials/add-img-maps-admin-display.php+29
Trying to access array offset on value of type bool
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
- 5× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/add-image-maps/admin/partials/add-img-maps-admin-display.php:16
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/add-image-maps/tests/class-add-img-maps-test.php:10
- > PHP Warning
require_once(/home/ian/wordpress-dev/trunk/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/add-image-maps/tests/bootstrap.php on line 18
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/add-image-maps/tests/class-add-img-maps-map-test.php:10
- > PHP Fatal error
require_once(): Failed opening required '/home/ian/wordpress-dev/trunk/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/add-image-maps/tests/bootstrap.php on line 18
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: images, display, imagemaps, links
add-image-maps/add-img-maps.php 85% from 13 tests
Analyzing the main PHP file in "Add Image Maps" version 1.0.0
You should first fix the following items:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("add-image-maps.php" instead of "add-img-maps.php")
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected2,044 lines of code in 23 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 16 | 379 | 1,006 | 1,154 |
JavaScript | 3 | 206 | 483 | 745 |
Markdown | 2 | 50 | 0 | 101 |
CSS | 1 | 14 | 18 | 34 |
XML | 1 | 0 | 0 | 10 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 12.36 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 41.00 |
Average method complexity | 2.62 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 21.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 11 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 11 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 53 | |
▷ Static methods | 6 | 11.32% |
▷ Public methods | 46 | 86.79% |
▷ Protected methods | 2 | 3.77% |
▷ Private methods | 5 | 9.43% |
Functions | 8 | |
▷ Named functions | 4 | 50.00% |
▷ Anonymous functions | 4 | 50.00% |
Constants | 4 | |
▷ Global constants | 2 | 50.00% |
▷ Class constants | 2 | 50.00% |
▷ Public constants | 2 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected