84% kc-media-enhancements

Code Review | KC Media Enhancements

WordPress plugin KC Media Enhancements scored 84% from 54 tests.

About plugin

  • Plugin page: kc-media-enhancem...
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.6.1
  • WordPress version: 5.9.2
  • First release: Apr 11, 2011
  • Latest release: Oct 19, 2013
  • Number of updates: 17
  • Update frequency: every 54.2 days
  • Top authors: kucrut (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 17,422 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼292.37ms] Passed 4 tests

A check of server-side resources used by KC Media Enhancements
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0856.47 ▲2.22
Dashboard /wp-admin3.46 ▲0.0533.26 ▼0.58
Posts /wp-admin/edit.php3.68 ▲0.0436.67 ▼4.57
Add New Post /wp-admin/post-new.php6.95 ▼0.0293.39 ▼1,166.53
Media Library /wp-admin/upload.php3.34 ▲0.0527.93 ▲3.44
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=attachment3.3333.93
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=attachment3.3326.32

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 36 new files
Database: no new tables, 1 new option
New WordPress options
category_children

Browser metrics Passed 4 tests

Checking browser requirements for KC Media Enhancements
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,793 ▲3915.94 ▲0.285.85 ▼0.102.51 ▲0.10
Dashboard /wp-admin2,902 ▲416.00 ▼0.16118.72 ▼17.64154.51 ▼5.07
Posts /wp-admin/edit.php2,701 ▲73.23 ▼0.0164.72 ▲3.64135.73 ▼11.10
Add New Post /wp-admin/post-new.php1,673 ▼4616.05 ▼6.28428.20 ▲25.74149.60 ▼7.20
Media Library /wp-admin/upload.php1,727 ▲265.61 ▲0.09124.06 ▼13.98185.39 ▼1.84
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=attachment1,8832.7656.14137.14
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=attachment1,7092.7855.98118.13

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • category_children

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kc-media-enhancements/kc-media-enhancements.php:281

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === kc-media-enhancements === )
  • Screenshots: Please describe screenshot #4 in kc-media-enhancements/assets to your readme.txt
The official readme.txt might help

kc-media-enhancements/kc-media-enhancements.php Passed 13 tests

The entry point to "KC Media Enhancements" version 0.6 is a PHP file that has certain tags in its header comment area
45 characters long description:
Enhance WordPress media/attachment management

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin2,408 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
CSS18822622,206
PHP14080161
JavaScript18641

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods8100.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
kc-media-enhancements-inc/css/jquery-ui/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
kc-media-enhancements-inc/css/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
kc-media-enhancements-inc/css/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
kc-media-enhancements-inc/css/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
kc-media-enhancements-inc/css/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%