10% kk-i-like-it

Code Review | KK I Like It

WordPress plugin KK I Like It scored10%from 54 tests.

About plugin

  • Plugin page: kk-i-like-it
  • Plugin version: 1.7.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1
  • WordPress version: 6.3.1
  • First release: Jun 22, 2012
  • Latest release: Jan 20, 2015
  • Number of updates: 81
  • Update frequency: every 11.7 days
  • Top authors: Krzy-siek (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

100+ active /20,772 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/kk-i-like-it/prezentacja.php+9
    Function create_function() is deprecated

Server metrics [RAM: ▼1.71MB] [CPU: ▼54.79ms] Passed 4 tests

Analyzing server-side resources used by KK I Like It
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.196.72 ▼37.91
Dashboard /wp-admin2.30 ▼1.017.41 ▼47.92
Posts /wp-admin/edit.php2.30 ▼1.067.01 ▼42.03
Add New Post /wp-admin/post-new.php2.30 ▼3.598.33 ▼91.31
Media Library /wp-admin/upload.php2.30 ▼0.938.40 ▼26.36
Stats /wp-admin/admin.php?page=kklike-stats2.307.51
Documentation /wp-admin/admin.php?page=kklike-documentation2.307.21
Settings /wp-admin/admin.php?page=kklike-settings2.306.93
KKILikeIt /wp-admin/admin.php?page=kklike-menu2.307.60
Changelog /wp-admin/admin.php?page=kklike-changelog2.307.03

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 141 new files
Database: 2 new tables, 10 new options
New tables
wp_kklikeuser
wp_kklike
New WordPress options
widget_kklikelastliked
can_compress_scripts
widget_kklikemostliked
db_upgraded
widget_theysaidso_widget
kklikesettings
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_kklikeuserliked

Browser metrics Passed 4 tests

This is an overview of browser requirements for KK I Like It
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲15813.52 ▼1.209.24 ▲7.2745.10 ▲1.23
Dashboard /wp-admin2,239 ▲595.70 ▲0.0887.42 ▼5.6680.54 ▲37.46
Posts /wp-admin/edit.php2,162 ▲592.10 ▲0.0943.21 ▼3.1835.96 ▼4.11
Add New Post /wp-admin/post-new.php6,479 ▲4,95327.60 ▲4.14907.01 ▲263.1450.34 ▼8.11
Media Library /wp-admin/upload.php1,450 ▲504.25 ▲0.01101.75 ▼6.4981.17 ▲38.62
Stats /wp-admin/admin.php?page=kklike-stats1,1723.7374.2543.64
Documentation /wp-admin/admin.php?page=kklike-documentation1,1233.4270.8741.77
Settings /wp-admin/admin.php?page=kklike-settings2,1113.8186.9196.67
KKILikeIt /wp-admin/admin.php?page=kklike-menu1,2364.27115.5741.61
Changelog /wp-admin/admin.php?page=kklike-changelog1,4493.4368.9038.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/kk-i-like-it/prezentacja.php+9
    Function create_function() is deprecated
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_kklikeuser
    • wp_kklike
  • Zombie WordPress options detected upon uninstall: 10 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_kklikeuserliked
    • widget_kklikelastliked
    • widget_kklikemostliked
    • kklikesettings
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kklike-changelog
    • > Deprecated in wp-content/plugins/kk-i-like-it/prezentacja.php+246
    Function create_function() is deprecated
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kklike-changelog
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in kklikeMostLiked is deprecated since version 4.3.0! Use __construct() instead.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kklike-changelog
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in kklikeLastLiked is deprecated since version 4.3.0! Use __construct() instead.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kklike-changelog
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in kklikeUserLiked is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kklike-stats
    • > Notice in wp-content/plugins/kk-i-like-it/stats.php+49
    Undefined index: charts
    • > GET request to /wp-admin/admin.php?page=kklike-menu
    • > Deprecated in wp-content/plugins/kk-i-like-it/top-liked.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; objSorter has a deprecated constructor
    • > GET request to /wp-admin/admin.php?page=kklike-menu
    • > Notice in wp-content/plugins/kk-i-like-it/top-liked.php+9
    Undefined offset: 0
    • > GET request to /wp-admin/admin.php?page=kklike-menu
    • > Warning in wp-content/plugins/kk-i-like-it/top-liked.php+10
    get_object_vars() expects parameter 1 to be object, null given
    • > GET request to /wp-admin/admin.php?page=kklike-menu
    • > Deprecated in wp-content/plugins/kk-i-like-it/top-liked.php+28
    The each() function is deprecated. This message will be suppressed on further calls
    • > GET request to /wp-admin/admin.php?page=kklike-menu
    • > Warning in wp-content/plugins/kk-i-like-it/top-liked.php+28
    Variable passed to each() is not an array or object

SRP 0% 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 fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/kk-i-like-it/changelog.php
    • > /wp-content/plugins/kk-i-like-it/head.php
    • > /wp-content/plugins/kk-i-like-it/sidebar.php
  • 29× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/kk-i-like-it/menu.inc.php:2
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/kk-i-like-it/sidebar.php on line 8
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/kk-i-like-it/kkDataBase.class.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/kk-i-like-it/menu.inc.php:2
    • > PHP Warning
      Use of undefined constant PLUGIN_VERSION - assumed 'PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/kk-i-like-it/head.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/kk-i-like-it/prezentacja.php:3
    • > PHP Notice
      Undefined variable: db in wp-content/plugins/kk-i-like-it/top-liked.php on line 54
    • > PHP Warning
      Use of undefined constant PLUGIN_VERSION - assumed 'PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/kk-i-like-it/head.php on line 2
    • > PHP Warning
      Use of undefined constant PLUGIN_VERSION - assumed 'PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/kk-i-like-it/head.php on line 2
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/kk-i-like-it/kkDataBase.class.php on line 15

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kklike-menu
    • > Network (severe)
    wp-content/plugins/kk-i-like-it/js/jqplot.canvasAxisTickRenderer.min.js?ver=1.7.4 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kklike-menu
    • > Network (severe)
    wp-content/plugins/kk-i-like-it/js/jqplot.pointLabels.min.js?ver=1.7.4 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kklike-menu
    • > Network (severe)
    wp-content/plugins/kk-i-like-it/js/jqplot.pieRenderer.min.js?ver=1.7.4 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kklike-menu
    • > Network (severe)
    wp-content/plugins/kk-i-like-it/js/stats.js?ver=1.7.4 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kklike-changelog
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/kk-i-like-it/js/kklike-front.js?ver=1.6:5:25)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kklike-changelog
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/kk-i-like-it/js/admin.js?ver=1.7.4:30:59)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=kklike-changelog
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function
    • > GET request to /wp-admin/admin.php?page=kklike-settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at Object.initialize (/wp-content/plugins/kk-i-like-it/js/button-preview.js:15:30)\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=kklike-settings:164:26)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=kklike-menu
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught Error: No data specified

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 your attention:
  • Screenshots: These screenshots do not have images: #1 (Like list), #2 (Settings), #3 (Button), #4 (Widgets), #5 (Two widgets with statistics), #6 (Who liked this post - gavatar)
You can take inspiration from this readme.txt

kk-i-like-it/admin.php 92% from 13 tests

The main file in "KK I Like It" v. 1.7.5.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("kk-i-like-it.php" instead of "admin.php")

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
Good job! No executable or dangerous file extensions detected12,826 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
CSS91,3562977,527
JavaScript143664372,538
PHP164931002,455
PO File2236366306

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.60
▷ Minimum class complexity4.00
▷ Maximum class complexity28.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
79 PNG files occupy 0.48MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/black-tie/images/ui-icons_ededed_256x240.png4.27KB4.11KB▼ 3.78%
screenshot-6.png29.17KB11.22KB▼ 61.52%
images/iphone-style-checkboxes/slider_center.png0.25KB0.35KB0.00%
images/select.png0.49KB0.33KB▼ 33.40%
css/black-tie/images/ui-bg_flat_55_80c9ff_40x100.png0.18KB0.08KB▼ 51.67%