84% media-toolkit

Code Review | Media Toolkit

WordPress plugin Media Toolkit scored84%from 54 tests.

About plugin

  • Plugin page: media-toolkit
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Mar 2, 2023
  • Latest release: Dec 1, 2023
  • Number of updates: 6
  • Update frequency: every 45.7 days
  • Top authors: davidvongries (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,048 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by Media Toolkit
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.42 ▼7.44
Dashboard /wp-admin3.33 ▲0.0353.23 ▲6.95
Posts /wp-admin/edit.php3.38 ▲0.0246.08 ▼5.13
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.21 ▲0.91
Media Library /wp-admin/upload.php3.25 ▲0.0234.91 ▼1.38
Media Toolkit /wp-admin/upload.php?page=media-toolkit3.2833.19

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 37 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Media Toolkit: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.32 ▲0.111.74 ▼0.1839.97 ▼7.51
Dashboard /wp-admin2,199 ▲195.61 ▼0.0494.28 ▼4.5142.09 ▲0.17
Posts /wp-admin/edit.php2,101 ▲11.95 ▲0.0038.17 ▼2.9335.03 ▼0.81
Add New Post /wp-admin/post-new.php1,532 ▲623.35 ▼0.19601.02 ▼8.7052.37 ▲1.30
Media Library /wp-admin/upload.php1,407 ▲134.19 ▼0.0194.92 ▼4.6441.41 ▼0.66
Media Toolkit /wp-admin/upload.php?page=media-toolkit1,0832.0025.2663.96

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/media-toolkit/templates/metaboxes/review.php
    • > /wp-content/plugins/media-toolkit/templates/fields/image-max-dimension-field.php
    • > /wp-content/plugins/media-toolkit/templates/fields/compression-quality-field.php
    • > /wp-content/plugins/media-toolkit/templates/settings-page.php
    • > /wp-content/plugins/media-toolkit/templates/metaboxes/template-tags.php
    • > /wp-content/plugins/media-toolkit/media-toolkit.php
    • > /wp-content/plugins/media-toolkit/templates/fields/rename-uploaded-image-field.php
    • > /wp-content/plugins/media-toolkit/templates/fields/replace-original-image-field.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: photo quality, media toolkit, media library, image dimensions, image compression

media-toolkit/media-toolkit.php Passed 13 tests

Analyzing the main PHP file in "Media Toolkit" version 1.0
31 characters long description:
Toolkit for media in WordPress.

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 plugin1,798 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP203256361,005
CSS29329435
Sass1426220
TypeScript130297
JSON30040
JavaScript1011

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity19.33
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods54
▷ Static methods1935.19%
▷ Public methods5092.59%
▷ Protected methods00.00%
▷ Private methods47.41%
Functions18
▷ Named functions1266.67%
▷ Anonymous functions633.33%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png46.11KB16.59KB▼ 64.02%