10% kento-ads-rotator

Code Review | Kento Ads Rotator

WordPress plugin Kento Ads Rotator scored 10% from 54 tests.

About plugin

  • Plugin page: kento-ads-rotator
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.2
  • WordPress version: 6.3.1
  • First release: Feb 18, 2014
  • Latest release: Jun 9, 2015
  • Number of updates: 24
  • Update frequency: every 19.8 days
  • Top authors: kentothemes (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

100+ active / 13,161 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/kento-ads-rotator/includes/Browser.php+39
    Methods with the same name as their class will not be constructors in a future version of PHP; Browser_KADS has a deprecated constructor

Server metrics [RAM: ▼1.47MB] [CPU: ▼52.48ms] Passed 4 tests

An overview of server-side resources used by Kento Ads Rotator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.51 ▼0.956.20 ▼37.69
Dashboard /wp-admin2.53 ▼0.777.80 ▼42.66
Posts /wp-admin/edit.php2.53 ▼0.826.73 ▼38.58
Add New Post /wp-admin/post-new.php2.53 ▼3.358.21 ▼90.98
Media Library /wp-admin/upload.php2.53 ▼0.708.12 ▼29.07
Add New KADS /wp-admin/post-new.php?post_type=kads2.536.86
KADS /wp-admin/edit.php?post_type=kads2.538.03
kads Groups /wp-admin/edit-tags.php?taxonomy=kad&post_type=kads2.536.99
kads Info /wp-admin/edit.php?post_type=kads&page=kads_settings2.538.93

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 61 new files
Database: 1 new table, 6 new options
New tables
wp_kads_info
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Kento Ads Rotator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,963 ▲22813.60 ▼0.778.32 ▲6.4637.82 ▼3.92
Dashboard /wp-admin2,250 ▲594.96 ▼0.9594.01 ▼10.9586.31 ▲44.56
Posts /wp-admin/edit.php2,144 ▲552.27 ▲0.2737.06 ▲1.5835.60 ▲2.87
Add New Post /wp-admin/post-new.php1,571 ▲5223.10 ▼0.17764.72 ▲63.5957.57 ▲3.89
Media Library /wp-admin/upload.php1,442 ▲514.39 ▲0.1593.71 ▼9.8771.78 ▲26.66
Add New KADS /wp-admin/post-new.php?post_type=kads2,0982.6952.3170.50
KADS /wp-admin/edit.php?post_type=kads1,1192.2134.0732.43
kads Groups /wp-admin/edit-tags.php?taxonomy=kad&post_type=kads1,3202.3027.8131.31
kads Info /wp-admin/edit.php?post_type=kads&page=kads_settings9251.8427.1126.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/kento-ads-rotator/includes/Browser.php+39
    Methods with the same name as their class will not be constructors in a future version of PHP; Browser_KADS has a deprecated constructor
  • Zombie tables detected upon uninstall: 1 table
    • wp_kads_info
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=kads&page=kads_settings
    • > Deprecated in wp-content/plugins/kento-ads-rotator/includes/Browser.php+39
    Methods with the same name as their class will not be constructors in a future version of PHP; Browser_KADS has a deprecated constructor

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/kento-ads-rotator/index.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/kento-ads-rotator/kads-admin.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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 require attention:
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

kento-ads-rotator/index.php 92% from 13 tests

The main file in "Kento Ads Rotator" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("kento-ads-rotator.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,758 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP34963371,498
CSS1781193
JavaScript179067

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity135.00
▷ Minimum class complexity135.00
▷ Maximum class complexity135.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods64
▷ Static methods00.00%
▷ Public methods2132.81%
▷ Protected methods4367.19%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants57
▷ Global constants11.75%
▷ Class constants5698.25%
▷ Public constants56100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
55 PNG files occupy 0.67MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/browser/Internet-Explorer.png3.66KB1.18KB▼ 67.66%
css/browser/Iceweasel.png4.24KB1.36KB▼ 68.03%
css/browser/Amaya.png3.63KB1.06KB▼ 70.78%
css/platform/Linux.png0.75KB0.70KB▼ 6.40%
screenshot-1.png68.94KB26.20KB▼ 62.00%