10% basic-dev-tools

Code Review | Basic Dev Tools

WordPress plugin Basic Dev Tools scored 10% from 54 tests.

About plugin

  • Plugin page: basic-dev-tools
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 5.8.1
  • First release: Apr 30, 2015
  • Latest release: Nov 19, 2015
  • Number of updates: 22
  • Update frequency: every 9.3 days
  • Top authors: rodtech (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active / 851 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/basic-dev-tools/includes/tableobject/table_object.php+50
    Undefined index: page

Server metrics [RAM: ▼1.89MB] [CPU: ▼188.91ms] Passed 4 tests

A check of server-side resources used by Basic Dev Tools
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.74 ▼1.095.65 ▼27.99
Dashboard /wp-admin1.76 ▼1.295.87 ▼35.63
Posts /wp-admin/edit.php1.76 ▼1.355.13 ▼41.28
Add New Post /wp-admin/post-new.php1.76 ▼3.675.69 ▼650.51
Media Library /wp-admin/upload.php1.76 ▼1.245.94 ▼28.22
Post Type Manager /wp-admin/admin.php?page=basic-dev-tools/includes/post-type-manager.php1.765.76
Cron Manager /wp-admin/admin.php?page=basic-dev-tools/includes/cron-manager.php1.765.38
Special Settings /wp-admin/admin.php?page=basic-dev-tools/includes/index.php1.765.64

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 17 new files
Database: 2 new tables, no new options
New tables
basictools_cron_schedules
basictools_post_types

Browser metrics Passed 4 tests

Checking browser requirements for Basic Dev Tools
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,713 ▲11715.78 ▲0.357.53 ▼0.4442.80 ▼0.86
Dashboard /wp-admin3,004 ▲675.86 ▼0.23150.69 ▲1.93114.21 ▲8.03
Posts /wp-admin/edit.php2,773 ▲342.70 ▲0.0175.45 ▲6.6698.78 ▲10.47
Add New Post /wp-admin/post-new.php1,705 ▲2218.72 ▲0.03367.46 ▼33.56103.66 ▼0.55
Media Library /wp-admin/upload.php1,838 ▲135.04 ▲0.03164.27 ▲2.08111.33 ▲4.19
Post Type Manager /wp-admin/admin.php?page=basic-dev-tools/includes/post-type-manager.php1,1632.2455.1358.68
Cron Manager /wp-admin/admin.php?page=basic-dev-tools/includes/cron-manager.php1,7402.1255.8371.32
Special Settings /wp-admin/admin.php?page=basic-dev-tools/includes/index.php1,1722.1155.3064.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/basic-dev-tools/includes/tableobject/table_object.php+50
    Undefined index: page

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=basic-dev-tools/includes/index.php
    • > Notice in wp-content/plugins/basic-dev-tools/includes/cron-manager.php+55
    Undefined index: schedule_manager_add
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=basic-dev-tools/includes/index.php
    • > Notice in wp-content/plugins/basic-dev-tools/includes/cron-manager.php+55
    Undefined index: schedule_manager_edit
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=basic-dev-tools/includes/index.php
    • > Notice in wp-content/plugins/basic-dev-tools/includes/tableobject/table_object.php+103
    Undefined index: select
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=basic-dev-tools/includes/index.php
    • > Notice in wp-content/plugins/basic-dev-tools/includes/tableobject/table_object.php+123
    Undefined index: query_formats
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=basic-dev-tools/includes/index.php
    • > User notice in wp-includes/functions.php+5663
    wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=basic-dev-tools/includes/index.php
    • > User notice in wp-includes/functions.php+5663
    wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (1). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)
    • > GET request to /wp-admin/admin.php?page=basic-dev-tools/includes/cron-manager.php
    • > Deprecated in wp-content/plugins/basic-dev-tools/includes/cron-manager.php+343
    The each() function is deprecated. This message will be suppressed on further calls

SRP 0% 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 items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/basic-dev-tools/basic-dev-tools.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_schedules() in wp-content/plugins/basic-dev-tools/includes/cron-manager.php:43
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/basic-dev-tools/includes/tableobject/templates/generic_form.php:1
    • > PHP Notice
      Undefined index: page in wp-content/plugins/basic-dev-tools/includes/tableobject/table_object.php on line 50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/basic-dev-tools/includes/index.php:18
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/basic-dev-tools/includes/tableobject/templates/reduced_form.php:21
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/basic-dev-tools/includes/tableobject/templates/generic_show.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/basic-dev-tools/includes/tableobject/templates/reduced_show.php:7

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

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (On activation, the plugin adds a new menu with the available tools to use.), #2 (Special Settings page.), #3 (Task Manager Section in Cron Manager Page.), #4 (Schedules Manager Section in Cron Manager Page.), #5 (Post Types Manager Page with some items.)
Please take inspiration from this readme.txt

basic-dev-tools/basic-dev-tools.php Passed 13 tests

"Basic Dev Tools" version 1.4.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
41 characters long description:
Basic Tools and Functions for Development

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin1,255 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP10198251,255

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity50.25
▷ Minimum class complexity12.00
▷ Maximum class complexity107.00
Average method complexity4.79
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods52
▷ Static methods00.00%
▷ Public methods52100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
5 PNG files occupy 0.20MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png29.13KB6.71KB▼ 76.96%
screenshot-3.png73.53KB21.24KB▼ 71.11%
screenshot-5.png49.58KB13.15KB▼ 73.47%
screenshot-1.png16.60KB3.79KB▼ 77.14%
screenshot-2.png35.73KB6.99KB▼ 80.44%