63% gwyns-imagemap-selector

Code Review | Gwyn's Imagemap Selector

WordPress plugin Gwyn's Imagemap Selector scored 63% from 54 tests.

About plugin

  • Plugin page: gwyns-imagemap-se...
  • Plugin version: 0.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 5.9.2
  • First release: May 12, 2011
  • Latest release: Mar 31, 2016
  • Number of updates: 35
  • Update frequency: every 51.0 days
  • Top authors: GwynethLlewelyn (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active / 8,189 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼294.09ms] Passed 4 tests

A check of server-side resources used by Gwyn's Imagemap Selector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0159.78 ▲4.71
Dashboard /wp-admin3.43 ▲0.0335.39 ▼7.52
Posts /wp-admin/edit.php3.66 ▲0.0249.95 ▲5.55
Add New Post /wp-admin/post-new.php6.90 ▼0.0799.27 ▼1,174.08
Media Library /wp-admin/upload.php3.31 ▲0.0227.10 ▲0.53
Gwyn's Imagemap Selector /wp-admin/options-general.php?page=gwyns_imagemap_selector3.3230.60

Server storage [IO: ▲1.88MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 94 new files
Database: no new tables, 1 new option
New WordPress options
gwyns_imagemap_selector_settings

Browser metrics Passed 4 tests

An overview of browser requirements for Gwyn's Imagemap Selector
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,788 ▲4416.00 ▲0.356.07 ▼0.142.32 ▲0.16
Dashboard /wp-admin2,897 ▲436.11 ▼0.07112.79 ▼17.79230.54 ▲35.27
Posts /wp-admin/edit.php2,690 ▼13.23 ▼0.0064.77 ▲0.48142.85 ▲0.52
Add New Post /wp-admin/post-new.php1,776 ▲6520.96 ▼0.43440.55 ▼20.22193.16 ▲39.13
Media Library /wp-admin/upload.php1,700 ▲25.54 ▲0.07149.36 ▼17.36254.98 ▲64.52
Gwyn's Imagemap Selector /wp-admin/options-general.php?page=gwyns_imagemap_selector1,8974.2376.79167.12

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • gwyns_imagemap_selector_settings

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/gwyns-imagemap-selector/imagemap-creator/upload.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/gwyns-imagemap-selector/gwyns-imagemap-selector.php:736
    • > PHP Notice
      Undefined index: btn_add in wp-content/plugins/gwyns-imagemap-selector/imagemap-creator/upload.php on line 28

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=gwyns_imagemap_selector
    • > Javascript (severe) in unknown
    /wp-content/plugins/gwyns-imagemap-selector/imgmap/imgmap.js 2894:16 Uncaught TypeError: Constructor WeakMap requires 'new'
    • > GET request to /wp-admin/options-general.php?page=gwyns_imagemap_selector
    • > Javascript (severe) in unknown
    /wp-includes/js/dist/i18n.min.js?ver=30fcecb428a0e8383d3776bcdd3a7834 1:10087 Uncaught TypeError: Cannot read properties of undefined (reading 'defaultHooks')
    • > GET request to /wp-admin/options-general.php?page=gwyns_imagemap_selector
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=gwyns_imagemap_selector 1683:8 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')
    • > GET request to /wp-admin/options-general.php?page=gwyns_imagemap_selector
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=gwyns_imagemap_selector 1689:9 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')
    • > GET request to /wp-admin/options-general.php?page=gwyns_imagemap_selector
    • > Javascript (severe) in unknown
    /wp-admin/js/common.min.js?ver=5.9.2 1:69 Uncaught TypeError: Cannot read properties of undefined (reading '__')
    • > GET request to /wp-admin/options-general.php?page=gwyns_imagemap_selector
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=gwyns_imagemap_selector 1704:9 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')
    • > GET request to /wp-admin/options-general.php?page=gwyns_imagemap_selector
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=gwyns_imagemap_selector 1746:9 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')
    • > GET request to /wp-admin/options-general.php?page=gwyns_imagemap_selector
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=gwyns_imagemap_selector 1758:9 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')
    • > GET request to /wp-admin/options-general.php?page=gwyns_imagemap_selector
    • > Javascript (severe) in unknown
    /wp-includes/js/media-views.min.js?ver=5.9.2 1:21875 Uncaught TypeError: Cannot read properties of undefined (reading '__')
    • > GET request to /wp-admin/options-general.php?page=gwyns_imagemap_selector
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=gwyns_imagemap_selector 1766:9 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')
    • > GET request to /wp-admin/options-general.php?page=gwyns_imagemap_selector
    • > Javascript (severe) in unknown
    /wp-includes/js/media-audiovideo.min.js?ver=5.9.2 1:1550 Uncaught TypeError: Cannot read properties of undefined (reading 'AttachmentDisplay')
    • > GET request to /wp-admin/options-general.php?page=gwyns_imagemap_selector
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=gwyns_imagemap_selector 1780:9 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')
    • > GET request to /wp-admin/options-general.php?page=gwyns_imagemap_selector
    • > Javascript (severe) in unknown
    /wp-admin/js/image-edit.min.js?ver=5.9.2 1:27 Uncaught TypeError: Cannot read properties of undefined (reading '__')
    • > GET request to /wp-admin/options-general.php?page=gwyns_imagemap_selector
    • > Javascript (severe) in unknown
    /wp-includes/js/dist/a11y.min.js?ver=68e470cf840f69530e9db3be229ad4b6 1:2054 Uncaught TypeError: Cannot read properties of undefined (reading '__')

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
1 plugin tags: imagemap

gwyns-imagemap-selector/gwyns-imagemap-selector.php Passed 13 tests

The primary PHP file in "Gwyn's Imagemap Selector" version 0.3.3 is used by WordPress to initiate all plugin functionality
62 characters long description:
Uses shortcodes to display imagemaps with categories of posts.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Please make sure to remedy the following
  • For security reasons, never distribute binary or executable files with your plugin
    • .jar - Java Archive in Firefox, IE, Chrome, Safari
      • wp-content/plugins/gwyns-imagemap-selector/imgmap/build/ant-googlecode-0.0.0test.jar
      • wp-content/plugins/gwyns-imagemap-selector/imgmap/build/custom_rhino.jar
      • wp-content/plugins/gwyns-imagemap-selector/imgmap/build/jsch-0.1.36.jar
      • wp-content/plugins/gwyns-imagemap-selector/imgmap/build/jsmin.0.2.3.jar
7,853 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript207291,3345,060
CSS713840800
PHP399102627
PO File2132152622
HTML47329421
Ant15053323

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
19 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
imgmap/build/jsdoc-tpl/outline2/static/images/field_protected_obj.png0.16KB0.16KB▼ 0.60%
imgmap/build/jsdoc-tpl/outline2/static/images/method_private_obj.png0.19KB0.19KB▼ 0.51%
imgmap/build/jsdoc-tpl/outline2/static/images/class_obj.png0.52KB0.52KB0.00%
popup-background.png1.35KB1.30KB▼ 4.11%
imgmap/build/jsdoc-tpl/outline2/static/images/classfo_obj.png0.31KB0.31KB0.32%