73% kento-star-rate

Code Review | Kento Star Rate

WordPress plugin Kento Star Rate scored 73% from 54 tests.

About plugin

  • Plugin page: kento-star-rate
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.2
  • WordPress version: 6.3.1
  • First release: Jan 15, 2014
  • Latest release: Jun 9, 2015
  • Number of updates: 13
  • Update frequency: every 39.3 days
  • Top authors: kentothemes (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active / 3,991 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.65ms] Passed 4 tests

Server-side resources used by Kento Star Rate
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.73 ▲2.54
Dashboard /wp-admin3.36 ▲0.0645.18 ▼3.28
Posts /wp-admin/edit.php3.41 ▲0.0549.76 ▲2.20
Add New Post /wp-admin/post-new.php5.96 ▲0.0788.96 ▼14.68
Media Library /wp-admin/upload.php3.28 ▲0.0536.64 ▲1.15

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 25 new files
Database: 2 new tables, 6 new options
New tables
wp_ksr_info
wp_ksr
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Kento Star Rate
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲23413.88 ▼0.715.09 ▲3.3738.63 ▼6.50
Dashboard /wp-admin2,248 ▲565.14 ▲0.23111.33 ▲4.1641.00 ▼9.85
Posts /wp-admin/edit.php2,133 ▲442.30 ▲0.3142.70 ▲0.9035.30 ▼2.31
Add New Post /wp-admin/post-new.php1,551 ▲1823.46 ▲0.19613.57 ▼45.2334.27 ▼16.48
Media Library /wp-admin/upload.php1,430 ▲454.51 ▲0.3098.63 ▲4.6641.82 ▼0.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_ksr
    • wp_ksr_info
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/kento-star-rate/kento-star-rate-admin.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/kento-star-rate/index.php:15
    • > 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/kento-star-rate/index.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: Add images for these screenshots: #1 (Already vote.), #2 (Custom Stars Design.), #3 (No Star Rate.), #4 (On Mouse Hover.), #5 (On Vote.), #6 (Unlimited Color.), #7 (Unlimited Star Size.), #8 (Setting.)
You can look at the official readme.txt

kento-star-rate/index.php 92% from 13 tests

The main file in "Kento Star Rate" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("kento-star-rate.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected525 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP220817375
CSS125106
JavaScript127044

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.21
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
20 PNG files occupy 0.33MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/stars/star-5.png1.99KB1.52KB▼ 23.45%
screenshot-3.png19.33KB8.14KB▼ 57.91%
css/stars-bg/star-4.png4.16KB1.55KB▼ 62.71%
screenshot-7.png44.58KB18.07KB▼ 59.47%
css/stars-bg/star-3.png6.57KB2.43KB▼ 63.04%