78% kn-social-slide

Code Review | KN Social Slide

WordPress plugin KN Social Slide scored78%from 54 tests.

About plugin

  • Plugin page: kn-social-slide
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.3.1
  • WordPress version: 6.3.1
  • First release: Jan 3, 2012
  • Latest release: Jan 24, 2012
  • Number of updates: 58
  • Update frequency: every 0.4 days
  • Top authors: KakiNetwork (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /15,609 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.11ms] Passed 4 tests

A check of server-side resources used by KN Social Slide
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.06 ▲1.40
Dashboard /wp-admin3.35 ▲0.0046.76 ▼14.44
Posts /wp-admin/edit.php3.40 ▲0.0444.09 ▼4.44
Add New Post /wp-admin/post-new.php5.93 ▲0.0481.13 ▼10.01
Media Library /wp-admin/upload.php3.27 ▲0.0434.39 ▲0.45

Server storage [IO: ▲0.58MB] [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: 42 new files
Database: no new tables, 29 new options
New WordPress options
widget_recent-posts
kn_socialslide_facebook_id
kn_socialslide_feedburner_id
kn_socialslide_twitter_top
db_upgraded
kn_socialslide_kakinetwork_auto_open
kn_socialslide_kakinetwork_top
kn_socialslide_kakinetwork
kn_socialslide_feedburner_top
can_compress_scripts
...

Browser metrics Passed 4 tests

An overview of browser requirements for KN Social Slide
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,371 ▲62522.69 ▲8.31190.61 ▲189.0193.52 ▲51.97
Dashboard /wp-admin2,224 ▲334.96 ▼0.1293.57 ▼10.3497.44 ▲56.06
Posts /wp-admin/edit.php2,104 ▲182.01 ▲0.0438.53 ▲2.0437.39 ▲6.55
Add New Post /wp-admin/post-new.php1,690 ▲16224.60 ▲1.24709.92 ▲53.3752.06 ▼13.13
Media Library /wp-admin/upload.php1,406 ▲154.22 ▼0.04102.08 ▲3.8775.37 ▲31.16

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 28 options in the database
    • kn_socialslide_facebook_position
    • kn_socialslide_twitter
    • kn_socialslide_twitter_position
    • kn_socialslide_twitter_show
    • kn_socialslide_facebook_top
    • kn_socialslide_googleplus_top
    • widget_recent-posts
    • kn_socialslide_noConflict
    • kn_socialslide_kakinetwork_position
    • db_upgraded
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Please take a closer look at the following
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/kn-social-slide/libs/random.php
    • > /wp-content/plugins/kn-social-slide/social_slide.php
    • > /wp-content/plugins/kn-social-slide/libs/feedburner.php
    • > /wp-content/plugins/kn-social-slide/libs/index.php
    • > /wp-content/plugins/kn-social-slide/libs/random.xml.php
  • 84× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: kakinetwork in wp-content/plugins/kn-social-slide/social_slide.php on line 11
    • > PHP Notice
      Undefined variable: kn_plugin in wp-content/plugins/kn-social-slide/settings.php on line 5
    • > PHP Notice
      Undefined variable: googleplus in wp-content/plugins/kn-social-slide/social_slide.php on line 53
    • > PHP Notice
      Undefined variable: feedburner in wp-content/plugins/kn-social-slide/manage.php on line 40
    • > PHP Notice
      Undefined variable: plugin_url in wp-content/plugins/kn-social-slide/social_slide.php on line 2
    • > PHP Notice
      Undefined variable: kakinetwork in wp-content/plugins/kn-social-slide/manage.php on line 55
    • > PHP Notice
      Undefined variable: facebook_top in wp-content/plugins/kn-social-slide/manage.php on line 91
    • > PHP Notice
      Undefined variable: facebook_id in wp-content/plugins/kn-social-slide/manage.php on line 105
    • > PHP Notice
      Undefined variable: facebook in wp-content/plugins/kn-social-slide/manage.php on line 9
    • > PHP Notice
      Undefined variable: facebook in wp-content/plugins/kn-social-slide/manage.php on line 96

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Random Post In Action), #2 (Setting Page)
You can take inspiration from this readme.txt

kn-social-slide/index.php 85% from 13 tests

The entry point to "KN Social Slide" version 1.1.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("kn-social-slide.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 471 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,871 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript10121,129
PHP10111714
CSS10328

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.68
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
27 PNG files occupy 0.19MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/googleplus_on.png0.83KB0.92KB0.00%
images/icons/feedburner_on.png0.83KB0.93KB0.00%
images/icons/facebook_on.png0.79KB0.92KB0.00%
screenshot-1.png17.91KB6.51KB▼ 63.67%
images/feedburner_right.png5.85KB2.38KB▼ 59.29%