Benchmarks
Plugin footprint 48% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.20MB] [CPU: ▲2.57ms] Passed 4 tests
An overview of server-side resources used by Iran agency map
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.65 ▲0.19 | 48.39 ▲1.28 |
Dashboard /wp-admin | 3.52 ▲0.21 | 54.51 ▲6.24 |
Posts /wp-admin/edit.php | 3.63 ▲0.27 | 57.10 ▲8.44 |
Add New Post /wp-admin/post-new.php | 6.10 ▲0.21 | 86.06 ▼1.17 |
Media Library /wp-admin/upload.php | 3.42 ▲0.19 | 37.66 ▲3.91 |
Settings /wp-admin/admin.php?page=agencies_setting | 3.42 | 38.43 |
agencies /wp-admin/admin.php?page=agencies | 3.42 | 40.19 |
Add new /wp-admin/admin.php?page=agencies_form | 3.39 | 29.87 |
Server storage [IO: ▲0.54MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: 2 new tables, 7 new options
New tables |
---|
wp_iam_province_info |
wp_iam_agencies_info |
New WordPress options |
---|
iran_agency_map_db_version |
can_compress_scripts |
widget_recent-posts |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for Iran agency map
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,078 ▲332 | 15.66 ▲1.03 | 9.40 ▲7.62 | 38.69 ▼5.29 |
Dashboard /wp-admin | 2,392 ▲207 | 6.65 ▲0.75 | 134.01 ▲20.71 | 37.97 ▼8.51 |
Posts /wp-admin/edit.php | 2,307 ▲218 | 3.54 ▲1.58 | 58.65 ▲23.80 | 34.50 ▼0.70 |
Add New Post /wp-admin/post-new.php | 1,559 ▲45 | 23.23 ▲5.76 | 661.79 ▼30.36 | 38.04 ▼18.12 |
Media Library /wp-admin/upload.php | 1,444 ▲56 | 4.34 ▲0.12 | 82.34 ▼16.98 | 39.95 ▼4.81 |
Settings /wp-admin/admin.php?page=agencies_setting | 1,264 | 3.59 | 60.35 | 43.59 |
agencies /wp-admin/admin.php?page=agencies | 1,301 | 3.38 | 39.09 | 27.33 |
Add new /wp-admin/admin.php?page=agencies_form | 1,368 | 3.37 | 41.88 | 29.28 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% 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
- Uninstall procedure validation failed for this plugin
- > Notice in wp-content/plugins/iran-agency-map/includes/uninstall.php+10
Undefined variable: wpdb
- The uninstall procedure failed, leaving 2 tables in the database
- wp_iam_agencies_info
- wp_iam_province_info
- This plugin does not fully uninstall, leaving 6 options in the database
- theysaidso_admin_options
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
- > GET request to /wp-admin/admin.php?page=agencies_form
- > Notice in wp-content/plugins/iran-agency-map/admin/new-edit-form-handler.php+105
Undefined variable: item_id
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
Please fix the following
- 7× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/iran-agency-map/includes/scripts.php:22
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/iran-agency-map/admin/iam-settings.php:2
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/iran-agency-map/admin/agency-item-lists.php on line 14
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/iran-agency-map/admin/iam-admin-menu.php:22
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/iran-agency-map/admin/agency-item-lists.php on line 14
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/iran-agency-map/public/iam-shortcode.php:2
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/iran-agency-map/admin/agency-item-lists.php on line 14
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: iran agency map, agencies, iran map
iran-agency-map/iran-agency-map.php Passed 13 tests
The primary PHP file in "Iran agency map" version 1.0.3 is used by WordPress to initiate all plugin functionality
127 characters long description:
The Iran-agency-map plugin is a great plugin for Iranian companies that they can display their agencies on a beautiful SVG map.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,487 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 11 | 187 | 255 | 991 |
CSS | 2 | 38 | 4 | 232 |
PO File | 1 | 81 | 85 | 179 |
JavaScript | 5 | 5 | 25 | 85 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.15 |
Average class complexity | 13.00 |
▷ Minimum class complexity | 13.00 |
▷ Maximum class complexity | 13.00 |
Average method complexity | 2.20 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.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 | 10 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 10 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 23 | |
▷ Named functions | 23 | 100.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
PNG files should be compressed to save space and minimize bandwidth usage
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
public/img/iam-mobile.png | 0.26KB | 0.26KB | 0.00% |
public/img/iam-phone.png | 0.27KB | 0.28KB | 0.00% |
public/img/iam-location.png | 0.29KB | 0.29KB | 0.00% |
public/img/iam-address.png | 0.18KB | 0.19KB | 0.00% |
public/img/iam-user.png | 0.32KB | 0.33KB | 0.00% |