84% media-files-tools

Code Review | Media Files Tools

WordPress plugin Media Files Tools scored84%from 54 tests.

About plugin

  • Plugin page: media-files-tools
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5
  • WordPress version: 6.3.1
  • First release: Mar 16, 2015
  • Latest release: Aug 17, 2020
  • Number of updates: 24
  • Update frequency: every 86.9 days
  • Top authors: j.conti (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

700+ active /8,210 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.64ms] Passed 4 tests

This is a short check of server-side resources used by Media Files Tools
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.07 ▼3.78
Dashboard /wp-admin3.40 ▲0.0950.40 ▼3.03
Posts /wp-admin/edit.php3.52 ▲0.1651.53 ▲7.65
Add New Post /wp-admin/post-new.php5.98 ▲0.0982.56 ▼5.81
Media Library /wp-admin/upload.php3.30 ▲0.0734.81 ▲2.07
File Tools /wp-admin/upload.php?page=wang_filesize3.3034.08

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Media Files Tools
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲17514.67 ▲0.261.73 ▼0.5042.73 ▼3.90
Dashboard /wp-admin2,352 ▲1646.41 ▲1.54138.12 ▲21.6937.67 ▼5.32
Posts /wp-admin/edit.php2,276 ▲1843.35 ▲1.3553.95 ▲18.2675.96 ▲43.30
Add New Post /wp-admin/post-new.php1,522 ▲323.09 ▼0.29622.90 ▲34.8536.41 ▼11.86
Media Library /wp-admin/upload.php1,426 ▲384.12 ▼0.1284.11 ▼12.0542.80 ▲0.27
File Tools /wp-admin/upload.php?page=wang_filesize9543.0237.1123.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 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/media-files-tools/media-files-tools.php:34

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: media library size, size, media, featured image, media library...

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

The primary PHP file in "Media Files Tools" version 1.2.2 is used by WordPress to initiate all plugin functionality
26 characters long description:
Add tools for media files.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin438 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11928298
JavaScript193379
PO File13681,08561

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin