78% killer-theme-options

Code Review | Killer Theme Options

WordPress plugin Killer Theme Options scored78%from 54 tests.

About plugin

  • Plugin page: killer-theme-options
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.3.1
  • WordPress version: 6.3.1
  • First release: Dec 4, 2015
  • Latest release: Feb 4, 2016
  • Number of updates: 19
  • Update frequency: every 3.3 days
  • Top authors: punitpatel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,449 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Killer Theme Options
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.78 ▲1.87
Dashboard /wp-admin3.32 ▼0.0250.41 ▼12.88
Posts /wp-admin/edit.php3.37 ▲0.0249.67 ▲0.36
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.84 ▼14.23
Media Library /wp-admin/upload.php3.25 ▲0.0240.96 ▲2.65
Killer Theme Options /wp-admin/themes.php?page=killeroptionsframework3.1931.94

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: no new tables, 11 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
kto_of_shortname
widget_recent-posts
kto_of_template
activated_killer_theme_options
recovery_mode_email_last_sent
kto_of_themename
...

Browser metrics Passed 4 tests

Checking browser requirements for Killer Theme Options
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲5813.19 ▼1.462.37 ▲0.6343.74 ▲0.93
Dashboard /wp-admin2,225 ▲225.84 ▼0.00114.61 ▲11.4141.82 ▲2.69
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0034.44 ▼4.9033.66 ▼3.22
Add New Post /wp-admin/post-new.php1,543 ▲323.38 ▲0.28657.59 ▼21.4660.14 ▲4.18
Media Library /wp-admin/upload.php1,404 ▲74.12 ▼0.13112.06 ▼1.2347.48 ▼0.67
Killer Theme Options /wp-admin/themes.php?page=killeroptionsframework7411.6919.8432.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • kto_of_themename
    • kto_of_shortname
    • kto_of_template
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/themes.php?page=killeroptionsframework
    • > Notice in wp-content/plugins/killer-theme-options/option/killer_theme_options_interface.php+481
    Undefined index: del
    • > GET request to /wp-admin/themes.php?page=killeroptionsframework
    • > Error in wp-content/plugins/killer-theme-options/option/killer_theme_options_interface.php+545
    Uncaught Error: Call to undefined function ereg_replace() in wp-content/plugins/killer-theme-options/option/killer_theme_options_interface.php:545
    Stack trace:
    #0 wp-content/plugins/killer-theme-options/option/killer_theme_options_interface.php(152): killer_theme_options_optionsframework_machine()
    #1 wp-includes/class-wp-hook.php(310): killer_theme_options_optionsframework_options_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 wp-admin/themes.php(10): require_once('/var/www/wordpr...')
    #6 {main}
    thrown

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 take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/killer-theme-options/option/killer_theme_options_design.php:107
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/killer-theme-options/killer-theme-options.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/killer-theme-options/option/killer_theme_options_interface.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (General options ( screenshot-1.png )), #2 (Social setting ( screenshot-2.png )), #3 (Create new custom field ( screenshot-3.png )), #4 (view created new custom fields with it's value ( screenshot-4.png ))
The official readme.txt is a good inspiration

killer-theme-options/killer-theme-options.php 92% from 13 tests

"Killer Theme Options" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 163 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,325 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP314678545
JavaScript190213379
CSS13917374
XML10027

PHP code Passed 2 tests

This is a very shot 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.42
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
15 PNG files occupy 0.52MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
option/images/2cl.png2.91KB0.24KB▼ 91.79%
option/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
option/images/wrench.png0.37KB0.27KB▼ 28.04%
screenshot-2.png156.06KB42.63KB▼ 72.68%
option/images/accept.png2.85KB0.17KB▼ 93.86%