10% ohio-sheriff-tools

Code Review | Ohio Sheriff Tools

WordPress plugin Ohio Sheriff Tools scored 10% from 54 tests.

About plugin

  • Plugin page: ohio-sheriff-tools
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.1
  • WordPress version: 5.8.1
  • First release: Apr 26, 2013
  • Latest release: Apr 26, 2013
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: brockrogers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 671 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/ohio-sheriff-tools/main.php+42
    Function create_function() is deprecated

Server metrics [RAM: ▼1.72MB] [CPU: ▼213.06ms] Passed 4 tests

Server-side resources used by Ohio Sheriff Tools
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.92 ▼0.924.92 ▼18.05
Dashboard /wp-admin1.94 ▼1.135.62 ▼30.68
Posts /wp-admin/edit.php1.94 ▼1.175.23 ▼25.47
Add New Post /wp-admin/post-new.php1.94 ▼3.504.62 ▼777.45
Media Library /wp-admin/upload.php1.94 ▼1.074.26 ▼18.64
Sheriff Sales /wp-admin/admin.php?page=sheriff_menu_sale1.944.72
Road Levels /wp-admin/admin.php?page=sheriff_menu_road1.944.44
Wanted /wp-admin/admin.php?page=sheriff_menu_wanted1.944.89
Sheriff Tools /wp-admin/admin.php?page=sheriff_menu_main1.944.68
Road Closures /wp-admin/admin.php?page=sheriff_menu_closures1.944.69

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: 1 new table, 3 new options
New tables
wp_road_closure
New WordPress options
category_children
widget_level_widget
sheriff_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for Ohio Sheriff Tools
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,734 ▲13316.00 ▲0.345.21 ▲0.1077.16 ▲0.17
Dashboard /wp-admin2,997 ▲986.14 ▲0.00113.52 ▼15.99164.95 ▼6.79
Posts /wp-admin/edit.php2,889 ▲1493.37 ▲0.1364.21 ▲0.17138.82 ▼3.22
Add New Post /wp-admin/post-new.php3,749 ▲519.13 ▲0.63409.08 ▼23.58161.66 ▼4.23
Media Library /wp-admin/upload.php1,819 ▲675.52 ▲0.00133.25 ▼9.13180.33 ▼8.01
Sheriff Sales /wp-admin/admin.php?page=sheriff_menu_sale1,1022.4052.1297.08
Road Levels /wp-admin/admin.php?page=sheriff_menu_road1,0942.4154.01102.45
Wanted /wp-admin/admin.php?page=sheriff_menu_wanted1,1022.3753.12104.26
Sheriff Tools /wp-admin/admin.php?page=sheriff_menu_main1,7162.3753.89142.73
Road Closures /wp-admin/admin.php?page=sheriff_menu_closures1,0932.3354.2799.05

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 cannot be uninstalled
    • > Deprecated in wp-content/plugins/ohio-sheriff-tools/main.php+42
    Function create_function() is deprecated
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_road_closure
  • Zombie WordPress options were found after uninstall: 3 options
    • widget_level_widget
    • category_children
    • sheriff_db_version

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
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sheriff_menu_closures
    • > Deprecated in wp-content/plugins/ohio-sheriff-tools/main.php+42
    Function create_function() is deprecated
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sheriff_menu_closures
    • > Notice in wp-content/plugins/ohio-sheriff-tools/main.php+84
    Undefined index: update_options

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ohio-sheriff-tools/road.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ohio-sheriff-tools/main.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ohio-sheriff-tools/closures.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: admin, wordpress, widget, manage, administration...

ohio-sheriff-tools/main.php 85% from 13 tests

The primary PHP file in "Ohio Sheriff Tools" version 0.1.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("ohio-sheriff-tools.php" instead of "main.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 297 characters long)

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 plugin672 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP66039672

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.83
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions29
▷ Named functions29100.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
PNG images were not found in this plugin