10% shortcode-imdb

Code Review | Shortcode IMDB

WordPress plugin Shortcode IMDB scored 10% from 54 tests.

About plugin

  • Plugin page: shortcode-imdb
  • Plugin version: 6.0.4
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 5.9.2
  • First release: Dec 4, 2018
  • Latest release: Mar 23, 2022
  • Number of updates: 169
  • Update frequency: every 7.1 days
  • Top authors: kyazici (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

1,000+ active / 48,884 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > User notice in wp-includes/functions.php+5768
    wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▼2.50MB] [CPU: ▼348.00ms] Passed 4 tests

This is a short check of server-side resources used by Shortcode IMDB
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.86 ▼1.653.87 ▼48.41
Dashboard /wp-admin1.88 ▼1.524.38 ▼33.33
Posts /wp-admin/edit.php1.88 ▼1.764.12 ▼34.68
Add New Post /wp-admin/post-new.php1.88 ▼5.094.38 ▼1,275.59
Media Library /wp-admin/upload.php1.88 ▼1.414.38 ▼24.00
Titles /wp-admin/admin.php?page=shortcode_imdb_titles1.883.59
Quotes /wp-admin/admin.php?page=shortcode_imdb_quotes1.884.91
Names /wp-admin/admin.php?page=shortcode_imdb_names1.884.65
Language Settings /wp-admin/admin.php?page=shortcode_imdb_lang1.884.21
ShortCode IMDB /wp-admin/admin.php?page=shortcode_imdb1.883.64

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 101 new files
Database: 1 new table, 1 new option
New tables
wp_shortcode_imdb_cache
New WordPress options
simdb_plugin_version

Browser metrics Passed 4 tests

A check of browser resources used by Shortcode IMDB
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,628 ▲88420.80 ▲4.7721.17 ▲14.592.24 ▼0.53
Dashboard /wp-admin3,123 ▲2657.79 ▲1.53121.68 ▼19.39212.35 ▲48.81
Posts /wp-admin/edit.php3,156 ▲4685.33 ▲2.0993.23 ▲28.41187.90 ▲48.02
Add New Post /wp-admin/post-new.php1,785 ▲7419.99 ▼0.93468.32 ▲6.34184.80 ▲23.33
Media Library /wp-admin/upload.php2,162 ▲4676.93 ▲1.44138.93 ▼6.65216.57 ▲30.71
Titles /wp-admin/admin.php?page=shortcode_imdb_titles1,8375.0089.52197.28
Quotes /wp-admin/admin.php?page=shortcode_imdb_quotes1,4614.5483.48140.54
Names /wp-admin/admin.php?page=shortcode_imdb_names1,8344.9971.04186.53
Language Settings /wp-admin/admin.php?page=shortcode_imdb_lang3,9754.7987.59159.60
ShortCode IMDB /wp-admin/admin.php?page=shortcode_imdb3,7414.6692.46303.37

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 cannot be uninstalled
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the editor handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 1 option in the database
    • simdb_plugin_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shortcode_imdb
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the editor handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shortcode_imdb
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the quicktags handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shortcode_imdb
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the buttons handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shortcode_imdb
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wplink handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shortcode_imdb
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-autocomplete handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shortcode_imdb
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the media-upload handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shortcode_imdb
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the editor-buttons handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shortcode_imdb_names
    • > Notice in wp-content/plugins/shortcode-imdb/includes/helpers/content.php+10
    Undefined index: add
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shortcode_imdb_names
    • > Notice in wp-content/plugins/shortcode-imdb/includes/helpers/content.php+10
    Undefined index: fetch

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/shortcode-imdb/includes/incadmin/disclaimer.php
  • 33× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/shortcode-imdb/includes/incadmin/tabs.edit.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'shimb_imdb_general' not found in wp-content/plugins/shortcode-imdb/includes/classes/class.api.php:2
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/shortcode-imdb/includes/classes/content/list/list.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/shortcode-imdb/includes/classes/content/list/list.show.video.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'shimdb_imdb_grab' not found in wp-content/plugins/shortcode-imdb/includes/helpers/classes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/shortcode-imdb/includes/incadmin/sidemenu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/shortcode-imdb/includes/classes/content/list/list.show.title.php:12
    • > PHP Notice
      Undefined variable: IMDB in wp-content/plugins/shortcode-imdb/includes/external/list.php on line 8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/shortcode-imdb/includes/classes/content/list/list.video.php:12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/shortcode-imdb/includes/helpers/cachelist.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: movie, imdb, e-commerce, woo, woocommerce

shortcode-imdb/shortcode-imdb.php 92% from 13 tests

This is the main PHP file of "Shortcode IMDB" version 6.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 217 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected9,230 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
PHP438855575,395
CSS3493452,877
JavaScript1314628808
HTML6220149
JSON1001

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 111)
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity70.00
▷ Minimum class complexity17.00
▷ Maximum class complexity189.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity111.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods89
▷ Static methods00.00%
▷ Public methods89100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
33 PNG files occupy 0.30MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/badges/list.png8.15KB3.52KB▼ 56.81%
includes/assets/arrow-down.png1.08KB0.33KB▼ 69.45%
includes/assets/badges/quote-closed.png11.91KB5.73KB▼ 51.84%
includes/assets/check2.png2.90KB1.47KB▼ 49.23%
includes/assets/badges/videos-closed.png14.50KB8.52KB▼ 41.23%