10% itm-option-panel

Code Review | ITM Option Panel

WordPress plugin ITM Option Panel scored10%from 54 tests.

About plugin

  • Plugin page: itm-option-panel
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2014
  • Latest release: Apr 16, 2014
  • Number of updates: 14
  • Update frequency: every 1.6 days
  • Top authors: rajat_itmonks (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,208 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_current_theme is deprecated since version 3.4.0! Use wp_get_theme() instead.

Server metrics [RAM: ▼1.78MB] [CPU: ▼50.47ms] Passed 4 tests

Analyzing server-side resources used by ITM Option Panel
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0747.53 ▲9.79
Dashboard /wp-admin2.16 ▼1.147.21 ▼40.58
Posts /wp-admin/edit.php2.17 ▼1.196.19 ▼40.08
Add New Post /wp-admin/post-new.php2.16 ▼3.735.93 ▼92.56
Media Library /wp-admin/upload.php2.17 ▼1.076.43 ▼28.64
Theme Options /wp-admin/themes.php?page=itmfw_options2.177.08

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 57 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
itmfw_option
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for ITM Option Panel
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.32 ▼1.261.69 ▲0.1022.03 ▼22.19
Dashboard /wp-admin2,231 ▲435.32 ▼0.5992.34 ▼11.8447.41 ▲2.81
Posts /wp-admin/edit.php2,129 ▲402.16 ▲0.1541.01 ▲2.0841.12 ▲5.30
Add New Post /wp-admin/post-new.php1,543 ▲923.51 ▲0.32686.05 ▲6.0636.97 ▼18.03
Media Library /wp-admin/upload.php1,420 ▲354.53 ▲0.3287.54 ▼10.6145.51 ▲2.90
Theme Options /wp-admin/themes.php?page=itmfw_options1,1272.5446.8653.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5453
    Function get_current_theme is deprecated since version 3.4.0! Use wp_get_theme() instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • itmfw_option
    • can_compress_scripts

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
Smoke test failed, please fix the following
    • > GET request to /wp-admin/themes.php?page=itmfw_options
    • > User deprecated in wp-includes/functions.php+5453
    Function get_current_theme is deprecated since version 3.4.0! Use wp_get_theme() instead.
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=itmfw_options
    • > Notice in wp-content/plugins/itm-option-panel/class.init.php+232
    Undefined index: title

SRP 50% 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
The following issues need your attention
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'ITM_FW' not found in wp-content/plugins/itm-option-panel/fields.init.php:9
    • > PHP Warning
      require(ITMFW_OPTION_PANEL_DIR/options.php): failed to open stream: No such file or directory in wp-content/plugins/itm-option-panel/class.init.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/itm-option-panel/theme-options.php:41
    • > PHP Fatal error
      require(): Failed opening required 'ITMFW_OPTION_PANEL_DIR/options.php' (include_path='.:/usr/share/php') in wp-content/plugins/itm-option-panel/class.init.php on line 13
    • > PHP Warning
      Use of undefined constant ITMFW_OPTION_PANEL_DIR - assumed 'ITMFW_OPTION_PANEL_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/itm-option-panel/class.init.php on line 13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/themes.php?page=itmfw_options
    • > Javascript (severe) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.7.0 1:11743 Uncaught Error: Syntax error, unrecognized expression: a[rel=]

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (/assets/1.0/screenshot-1.png) image required
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === itm-option-panel === )
You can look at the official readme.txt

itm-option-panel/theme-options.php 92% from 13 tests

"ITM Option Panel" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("itm-option-panel.php" instead of "theme-options.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected9,423 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS650447,639
JavaScript61948873
PHP491129497
SVG100414

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity21.50
▷ Minimum class complexity17.00
▷ Maximum class complexity26.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2395.83%
▷ Protected methods00.00%
▷ Private methods14.17%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
25 compressed PNG files occupy 0.18MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/custom_submit.png0.97KB0.99KB0.00%
assets/images/colorpicker_background.png1.85KB2.14KB0.00%
assets/images/custom_rgb_r.png0.99KB0.74KB▼ 25.34%
assets/images/custom_hex.png0.55KB0.39KB▼ 28.11%
assets/images/colorpicker_hsb_b.png0.95KB0.76KB▼ 19.48%