94% media-tools

Code Review | Media Tools

WordPress plugin Media Tools scored 94% from 54 tests.

About plugin

  • Plugin page: media-tools
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.4.1
  • WordPress version: 5.8.1
  • First release: Jul 28, 2012
  • Latest release: Apr 1, 2014
  • Number of updates: 11
  • Update frequency: every 55.7 days
  • Top authors: c3mdigital (100%)

Code review

54 tests

User reviews

33 reviews

Install metrics

3,000+ active / 35,360 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼148.83ms] Passed 4 tests

A check of server-side resources used by Media Tools
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.1239.09 ▲3.94
Dashboard /wp-admin3.18 ▲0.1350.77 ▲7.39
Posts /wp-admin/edit.php3.29 ▲0.1948.48 ▲2.10
Add New Post /wp-admin/post-new.php5.54 ▲0.1193.62 ▼597.90
Media Library /wp-admin/upload.php3.13 ▲0.1230.89 ▼3.46
Media Tools /wp-admin/tools.php?page=media_tabs3.1038.12

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Media Tools: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲13616.24 ▲0.2810.01 ▼1.9444.88 ▼7.71
Dashboard /wp-admin2,975 ▲385.88 ▼0.07147.64 ▼1.92111.22 ▲0.64
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0165.85 ▼2.5587.02 ▲7.79
Add New Post /wp-admin/post-new.php1,686 ▲318.48 ▼0.35386.94 ▼66.52108.66 ▼8.37
Media Library /wp-admin/upload.php1,812 ▲55.02 ▼0.01160.61 ▲4.55111.16 ▲3.48
Media Tools /wp-admin/tools.php?page=media_tabs1,4472.3963.8175.77

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_theme_supports() in wp-content/plugins/media-tools/media-tools.php:46

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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:
  • Screenshots: Add images for these screenshots: #1 (The Import and Attachment Tools), #2 (The Add additional image sizes options page)
The official readme.txt might help

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

"Media Tools" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
107 characters long description:
Tools for working with the WordPress media library and converting images to attachments and featured images

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
No dangerous file extensions were detected951 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP110468492
CSS12848330
JavaScript32923115
Markdown19014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity86.00
▷ Minimum class complexity86.00
▷ Maximum class complexity86.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
10 PNG files occupy 0.18MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
js/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png0.11KB0.09KB▼ 15.18%
screenshot-2.png72.59KB20.80KB▼ 71.35%
js/redmond/images/ui-bg_glass_85_dfeffc_1x400.png0.12KB0.15KB0.00%
js/redmond/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%