68% wp-supersized-image-map

Code Review | WP Supersized Image Map

WordPress plugin WP Supersized Image Map scored68%from 54 tests.

About plugin

  • Plugin page: wp-supersized-ima...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3.1
  • WordPress version: 6.3.1
  • First release: Sep 10, 2012
  • Latest release: Sep 11, 2012
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: another13 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,157 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼36.61ms] Passed 4 tests

A check of server-side resources used by WP Supersized Image Map
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0548.42 ▲5.62
Dashboard /wp-admin3.01 ▼0.3326.88 ▼36.07
Posts /wp-admin/edit.php3.01 ▼0.3428.10 ▼31.28
Add New Post /wp-admin/post-new.php3.01 ▼2.8724.82 ▼68.25
Media Library /wp-admin/upload.php3.01 ▼0.2226.86 ▼10.83
Settings /wp-admin/admin.php?page=wp-supersized-image-map-settings3.0135.21
Help /wp-admin/admin.php?page=wp-supersized-image-map-help3.0129.09
Images /wp-admin/edit.php?post_type=sim_images3.0226.44

Server storage [IO: ▲0.44MB] [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: 73 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WP Supersized Image Map
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲8214.36 ▲0.003.57 ▲1.6243.23 ▼1.09
Dashboard /wp-admin2,233 ▲535.56 ▼0.0385.41 ▼9.1538.79 ▼0.47
Posts /wp-admin/edit.php2,138 ▲352.00 ▲0.0643.14 ▲3.3835.76 ▼1.52
Add New Post /wp-admin/post-new.php1,558 ▲3222.41 ▼1.11685.06 ▲1.8051.99 ▼6.01
Media Library /wp-admin/upload.php1,435 ▲354.27 ▲0.0492.78 ▼20.5840.53 ▼6.83
Settings /wp-admin/admin.php?page=wp-supersized-image-map-settings8651.6537.0236.90
Help /wp-admin/admin.php?page=wp-supersized-image-map-help8272.0226.3027.13
Images /wp-admin/edit.php?post_type=sim_images1,1081.9130.0130.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 21 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sim_images
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sim_images
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/admin.php?page=wp-supersized-image-map-settings
    • > Notice in wp-content/plugins/wp-supersized-image-map/functions/sim-admin.php+6
    Undefined index: sim_hidden

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
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-supersized-image-map/includes/sim-shortcodes.php:81
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-supersized-image-map/includes/admin/column.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-supersized-image-map/wp-supersized-image-map.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_theme_support() in wp-content/plugins/wp-supersized-image-map/includes/thumbnails/sim-thumbnails.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-supersized-image-map/includes/defaults.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wp-supersized-image-map/includes/sim-languages.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (/tags/1.0/screenshot-1.jpg)
You can look at the official readme.txt

wp-supersized-image-map/wp-supersized-image-map.php Passed 13 tests

The primary PHP file in "WP Supersized Image Map" version 1.0 is used by WordPress to initiate all plugin functionality
49 characters long description:
Plugin for displaying a image map with supersized

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin4,174 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript125934681,889
PHP112832171,592
CSS75770252
HTML310154230
PO File287104211

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity205.00
▷ Minimum class complexity205.00
▷ Maximum class complexity205.00
Average method complexity6.83
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods35
▷ Static methods38.57%
▷ Public methods514.29%
▷ Protected methods3085.71%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants51
▷ Global constants51100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
30 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/user/jquery.colorbox/images/overlay.png2.73KB0.09KB▼ 96.60%
js/user/jquery.colorbox/images/loading_background.png0.15KB0.15KB▼ 0.64%
js/user/supersized/img/nav-bg.png0.97KB0.26KB▼ 72.76%
js/user/supersized/img/progress-bar.png0.91KB0.09KB▼ 89.67%
js/user/supersized/img/thumb-back.png2.07KB1.31KB▼ 36.71%