10% chokelive-bottracker

Code Review | ChokeLive BotTracker

WordPress plugin ChokeLive BotTracker scored10%from 54 tests.

About plugin

  • Plugin page: chokelive-bottracker
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Jun 23, 2013
  • Latest release: Jun 23, 2013
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: chokelive (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /820 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/chokelive-bottracker/widgets/cb_widgets.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; CBWidget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼52.20ms] Passed 4 tests

This is a short check of server-side resources used by ChokeLive BotTracker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.76 ▼35.45
Dashboard /wp-admin2.09 ▼1.216.23 ▼47.40
Posts /wp-admin/edit.php2.09 ▼1.265.65 ▼42.87
Add New Post /wp-admin/post-new.php2.09 ▼3.796.62 ▼83.08
Media Library /wp-admin/upload.php2.09 ▼1.146.45 ▼30.40
Chokelive Bottracker /wp-admin/options-general.php?page=chokelive_bottrack2.095.74

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_cbwidget
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for ChokeLive BotTracker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.25 ▲0.011.88 ▲0.2043.20 ▲0.46
Dashboard /wp-admin2,199 ▲255.63 ▲0.0597.81 ▲8.7441.74 ▼1.84
Posts /wp-admin/edit.php2,104 ▲11.94 ▼0.0739.38 ▼1.8636.17 ▼3.83
Add New Post /wp-admin/post-new.php1,540 ▲1423.14 ▼0.52648.69 ▼16.0753.02 ▲3.09
Media Library /wp-admin/upload.php1,404 ▲44.18 ▼0.01100.63 ▼5.5444.32 ▼1.64
Chokelive Bottracker /wp-admin/options-general.php?page=chokelive_bottrack6971.126.8918.10

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
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/chokelive-bottracker/widgets/cb_widgets.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; CBWidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_cbwidget
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=chokelive_bottrack
    • > Deprecated in wp-content/plugins/chokelive-bottracker/widgets/cb_widgets.php+20
    Methods with the same name as their class will not be constructors in a future version of PHP; CBWidget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=chokelive_bottrack
    • > Error in wp-admin/includes/template.php+1801
    Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/chokelive-bottracker/templates/settings.php on line 5 and exactly 2 expected in wp-admin/includes/template.php:1801
    Stack trace:
    #0 wp-content/plugins/chokelive-bottracker/templates/settings.php(5): do_settings_fields()
    #1 wp-content/plugins/chokelive-bottracker/settings.php(103): include('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(310): chokelive_bottrack_settings->plugin_settings_page()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

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 fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/chokelive-bottracker/widgets/cb_widgets.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/chokelive-bottracker/chokelive-bottracker.php:75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/chokelive-bottracker/templates/settings.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === chokelive-bottracker === )
  • Screenshots: These screenshots do not have images: #1 (screenshot-1.gif is the Bot-Tracking on the front of wordpress web.), #2 (screenshot-2.gif is the 'Chokelive-Bottracker' Option on the 'Admin > Settings > Chokelive-Bottracker' page.), #3 (screenshot-3.gif is the 'Chokelive-Bottracker Widgets' screen on the 'Appearance > Widgets' page.)
The official readme.txt is a good inspiration

chokelive-bottracker/chokelive-bottracker.php Passed 13 tests

"ChokeLive BotTracker" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
88 characters long description:
This pulgin is using for tracking the history of Bot that ever visited to your blog site

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
Good job! No executable or dangerous file extensions detected154 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP46681154

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity1.75
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.19
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods16
▷ Static methods212.50%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin