83% kontainer-file-picker

Code Review | Kontainer File Picker

WordPress plugin Kontainer File Picker scored83%from 54 tests.

About plugin

  • Plugin page: kontainer-file-pi...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0.2
  • WordPress version: 6.3.1
  • First release: Feb 24, 2021
  • Latest release: Sep 2, 2022
  • Number of updates: 3
  • Update frequency: every 185.0 days
  • Top authors: kontainer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /387 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.92ms] Passed 4 tests

A check of server-side resources used by Kontainer File Picker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.53 ▼1.39
Dashboard /wp-admin3.34 ▼0.0145.39 ▼11.28
Posts /wp-admin/edit.php3.39 ▲0.0347.47 ▲4.41
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.07 ▼4.10
Media Library /wp-admin/upload.php3.26 ▲0.0335.59 ▲1.08
Kontainer /wp-admin/options-general.php?page=kontainer3.2331.15

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Kontainer File Picker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.25 ▼0.111.78 ▲0.0538.43 ▼4.35
Dashboard /wp-admin2,209 ▲295.65 ▼0.0090.87 ▼3.1037.21 ▼6.36
Posts /wp-admin/edit.php2,114 ▲142.05 ▲0.0341.20 ▲3.6937.42 ▼0.25
Add New Post /wp-admin/post-new.php1,536 ▲723.49 ▲0.34668.37 ▲11.9955.48 ▼3.07
Media Library /wp-admin/upload.php1,413 ▲134.25 ▲0.0194.18 ▼12.1443.14 ▼3.83
Kontainer /wp-admin/options-general.php?page=kontainer8022.0426.4926.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kontainer-file-picker/inc/settings.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kontainer-file-picker/inc/settings.php:17

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

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: media, assets, dam

kontainer-file-picker/kontainer.php 77% from 13 tests

The main file in "Kontainer File Picker" v. 1.0.4 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:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.4" instead of "7.2")
  • Main file name: The principal plugin file should be the same as the plugin slug ("kontainer-file-picker.php" instead of "kontainer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin261 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23824118
JavaScript1377106
CSS14037

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin