10% tenkinetic-medic

Code Review | tenKinetic Medic

WordPress plugin tenKinetic Medic scored10%from 54 tests.

About plugin

  • Plugin page: tenkinetic-medic
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Dec 14, 2015
  • Latest release: Feb 25, 2016
  • Number of updates: 14
  • Update frequency: every 5.3 days
  • Top authors: tenkinetic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /516 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin cannot be installed
    • > User error in wp-content/plugins/tenkinetic-medic/TkMedic.php+207
    Could not create account: Could not create account: Could not resolve host: tenkinetic.com

Server metrics [RAM: ▲0.47MB] [CPU: ▼2.13ms] Passed 4 tests

Analyzing server-side resources used by tenKinetic Medic
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4641.36 ▼0.92
Dashboard /wp-admin3.81 ▲0.5150.68 ▼2.27
Posts /wp-admin/edit.php3.86 ▲0.5150.70 ▲2.44
Add New Post /wp-admin/post-new.php6.35 ▲0.4688.73 ▼7.79
Media Library /wp-admin/upload.php3.67 ▲0.4442.68 ▲9.42
Support /wp-admin/admin.php?page=tk-wpm-support3.6434.89
Overview /wp-admin/admin.php?page=tk-wpm3.6638.53
Usage /wp-admin/admin.php?page=tk-wpm-usage3.6435.32
Activity Log /wp-admin/admin.php?page=tk-wpm-activity3.6437.35

Server storage [IO: ▲0.55MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 58 new files
Database: 6 new tables, 13 new options
New tables
tk_wpm_patch
tk_wpm_patch_page
tk_wpm_account
tk_wpm_job
tk_wpm_message
tk_wpm_parameter
New WordPress options
tk_wpm_patch_sync
widget_recent-posts
tk_wpm_db_username
theysaidso_admin_options
tk_wpm_db_name
db_upgraded
widget_theysaidso_widget
tk_wpm_db_password
tk_wpm_db_version
widget_recent-comments
...

Browser metrics Passed 4 tests

tenKinetic Medic: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲11113.25 ▼1.345.04 ▲3.0241.14 ▼7.04
Dashboard /wp-admin2,237 ▲496.03 ▲1.1396.23 ▼18.3576.45 ▲29.64
Posts /wp-admin/edit.php2,135 ▲462.07 ▲0.0734.56 ▼3.5036.78 ▼1.87
Add New Post /wp-admin/post-new.php1,551 ▲823.25 ▲5.04688.20 ▲2.1438.27 ▼25.59
Media Library /wp-admin/upload.php1,434 ▲434.27 ▲0.08112.25 ▲8.7544.70 ▲2.46
Support /wp-admin/admin.php?page=tk-wpm-support8451.7324.9727.02
Overview /wp-admin/admin.php?page=tk-wpm1,0142.1828.3334.83
Usage /wp-admin/admin.php?page=tk-wpm-usage1,0491.7225.1029.32
Activity Log /wp-admin/admin.php?page=tk-wpm-activity9132.1238.4330.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

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)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tk-wpm
    • > Notice in wp-content/plugins/tenkinetic-medic/Classes/TkMedicAdminPages.php+140
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=tk-wpm
    • > Warning in wp-content/plugins/tenkinetic-medic/Classes/TkMedicAdminPages.php+968
    Illegal string offset 'success'
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tk-wpm
    • > Warning in wp-content/plugins/tenkinetic-medic/Classes/TkMedicAdminPages.php+992
    Illegal string offset 'account'
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tk-wpm
    • > Warning in wp-content/plugins/tenkinetic-medic/Classes/TkMedicAdminPages.php+992
    Illegal string offset 'verified'
    • > GET request to /wp-admin/admin.php?page=tk-wpm
    • > Warning in wp-content/plugins/tenkinetic-medic/Classes/TkMedicAdminPages.php+996
    Illegal string offset 'migration-data'
    • > GET request to /wp-admin/admin.php?page=tk-wpm
    • > Warning in wp-content/plugins/tenkinetic-medic/Classes/TkMedicAdminPages.php+174
    Invalid argument supplied for foreach()

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function db_version() on null in wp-content/plugins/tenkinetic-medic/TkMedic.php:472

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=tk-wpm
    • > Network (severe)
    http://tenkinetic.com/wordpress-medic/api/system-status/ - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: help, css, assistance, fixes, javascript...

tenkinetic-medic/TkMedic.php 77% from 13 tests

This is the main PHP file of "tenKinetic Medic" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/lang")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tenkinetic-medic.php" instead of "TkMedic.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected4,650 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP63012413,164
JavaScript32191941,296
CSS36138190

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity20.64
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes545.45%
▷ Concrete classes654.55%
▷ Final classes00.00%
Methods59
▷ Static methods1932.20%
▷ Public methods4677.97%
▷ Protected methods00.00%
▷ Private methods1322.03%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants20
▷ Global constants00.00%
▷ Class constants20100.00%
▷ Public constants20100.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
45 PNG files occupy 0.28MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Images/icon-minus.png0.36KB0.36KB0.00%
Images/icon-close.png6.94KB0.59KB▼ 91.47%
Images/icon-save.png6.87KB0.52KB▼ 92.48%
Images/icon-accept.png7.03KB0.76KB▼ 89.13%
Images/icon-open.png0.31KB0.31KB0.00%