10% kento-vote

Code Review | Kento Vote

WordPress plugin Kento Vote scored10%from 54 tests.

About plugin

  • Plugin page: kento-vote
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.2
  • WordPress version: 6.3.1
  • First release: Dec 19, 2013
  • Latest release: Jun 9, 2015
  • Number of updates: 17
  • Update frequency: every 31.6 days
  • Top authors: kentothemes (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /2,844 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
Please fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-includes/plugin.php+1001
    Undefined offset: 0

Server metrics [RAM: ▼1.85MB] [CPU: ▼54.34ms] Passed 4 tests

A check of server-side resources used by Kento Vote
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.334.67 ▼37.23
Dashboard /wp-admin2.16 ▼1.156.33 ▼42.63
Posts /wp-admin/edit.php2.16 ▼1.206.56 ▼36.40
Add New Post /wp-admin/post-new.php2.16 ▼3.736.82 ▼101.09
Media Library /wp-admin/upload.php2.16 ▼1.076.71 ▼27.12

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: 2 new tables, 6 new options
New tables
wp_kento_vote
wp_kento_vote_info
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Kento Vote
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲15513.70 ▼0.705.03 ▲3.3139.70 ▼4.04
Dashboard /wp-admin2,213 ▲255.86 ▲0.0595.96 ▼0.8438.68 ▼3.47
Posts /wp-admin/edit.php2,099 ▲102.03 ▼0.0138.84 ▼1.4335.63 ▼0.07
Add New Post /wp-admin/post-new.php1,530 ▲218.22 ▼0.15643.21 ▲42.0756.79 ▼4.55
Media Library /wp-admin/upload.php1,392 ▲104.22 ▼0.0099.98 ▲2.1143.57 ▲0.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function 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 inkthemes handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_kento_vote
    • wp_kento_vote_info
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kento-vote/index.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Who Vote on post.), #2 (Vote With Down Vote.), #3 (Vote With UpVote.), #4 (Login Box .), #5 (Normal View.)
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

kento-vote/index.php 92% from 13 tests

Analyzing the main PHP file in "Kento Vote" version 1.2
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("kento-vote.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected335 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16311247
CSS125187
JavaScript1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.23MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/kento-vote-up.png3.08KB0.21KB▼ 93.19%
css/kento-vote-down.png3.09KB0.22KB▼ 92.83%
screenshot-4.png30.30KB15.58KB▼ 48.59%
screenshot-3.png43.44KB21.15KB▼ 51.32%
screenshot-1.png61.00KB28.06KB▼ 54.00%