68% kento-testimonial-slider

Code Review | Kento Testimonial Slider

WordPress plugin Kento Testimonial Slider scored68%from 54 tests.

About plugin

  • Plugin page: kento-testimonial...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6.1
  • WordPress version: 6.3.1
  • First release: Dec 19, 2013
  • Latest release: Nov 24, 2016
  • Number of updates: 10
  • Update frequency: every 107.5 days
  • Top authors: kentothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /9,939 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: ▼1.92MB] [CPU: ▼58.74ms] Passed 4 tests

Analyzing server-side resources used by Kento Testimonial Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.398.60 ▼33.94
Dashboard /wp-admin2.09 ▼1.217.89 ▼45.54
Posts /wp-admin/edit.php2.09 ▼1.266.09 ▼52.04
Add New Post /wp-admin/post-new.php2.09 ▼3.808.01 ▼103.44
Media Library /wp-admin/upload.php2.09 ▼1.146.51 ▼30.26
Add New /wp-admin/post-new.php?post_type=kento-testimonial2.096.39
Testimonials /wp-admin/edit.php?post_type=kento-testimonial2.096.93

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Kento Testimonial Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲15413.49 ▼0.898.50 ▲6.5839.10 ▼6.67
Dashboard /wp-admin2,215 ▲355.68 ▲0.1283.58 ▼8.1768.70 ▲27.95
Posts /wp-admin/edit.php2,135 ▲352.01 ▲0.0136.97 ▼0.4435.59 ▼3.92
Add New Post /wp-admin/post-new.php1,555 ▲1017.78 ▼5.36762.07 ▲82.6740.39 ▼11.46
Media Library /wp-admin/upload.php1,426 ▲324.24 ▲0.0397.70 ▼3.0074.72 ▲33.70
Add New /wp-admin/post-new.php?post_type=kento-testimonial2,2557.65177.26125.14
Testimonials /wp-admin/edit.php?post_type=kento-testimonial1,0991.9430.4434.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 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 kento-testimonial-plugin-main-active handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=kento-testimonial
    • > POST request to /wp-admin/admin-ajax.php
    • > 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 kento-testimonial-plugin-main-active handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=kento-testimonial
    • > POST request to /wp-admin/admin-ajax.php
    • > 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 kento-testimonial-plugin-script-active handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=kento-testimonial
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style 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 kento-testimonial-plugin-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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 fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/kento-testimonial-slider/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-testimonial-slider/index.php on line 15

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 90% from 29 tests

readme.txt 88% 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 require images: #1 (Kento Testimonial Slider Testimonial in Sidebar.), #2 (Kento Testimonial Slider Post.), #3 (Kento Testimonial Slider Admin.)
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can look at the official readme.txt

kento-testimonial-slider/index.php 92% from 13 tests

The main PHP file in "Kento Testimonial Slider" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("kento-testimonial-slider.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 detected231 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32114106
PHP1232170
CSS10255

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.05
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
4 PNG files occupy 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png68.14KB25.67KB▼ 62.34%
css/quote.png3.44KB0.88KB▼ 74.43%
js/testimonial.png3.04KB0.27KB▼ 91.09%
testimonial.png3.04KB0.27KB▼ 91.09%