84% media-metadata-list

Code Review | Media Metadata List

WordPress plugin Media Metadata List scored84%from 54 tests.

About plugin

  • Plugin page: media-metadata-list
  • Plugin version: 2.02
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Jul 26, 2019
  • Latest release: Oct 29, 2023
  • Number of updates: 41
  • Update frequency: every 37.9 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,790 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.44ms] Passed 4 tests

Analyzing server-side resources used by Media Metadata List
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.51 ▼6.69
Dashboard /wp-admin3.31 ▲0.0142.28 ▼7.87
Posts /wp-admin/edit.php3.36 ▲0.0145.68 ▼2.15
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.24 ▼17.05
Media Library /wp-admin/upload.php3.24 ▲0.0133.43 ▼0.93

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Media Metadata List: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.27 ▼0.451.58 ▼0.3938.87 ▼6.93
Dashboard /wp-admin2,198 ▲185.61 ▼0.0693.81 ▼4.3640.60 ▼5.56
Posts /wp-admin/edit.php2,103 ▲32.01 ▼0.1338.75 ▲0.4634.76 ▼3.09
Add New Post /wp-admin/post-new.php1,526 ▼023.07 ▼0.02599.97 ▼3.8347.78 ▼0.49
Media Library /wp-admin/upload.php1,397 ▲34.22 ▲0.0596.32 ▼4.7544.45 ▲2.43

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

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/media-metadata-list/lib/class-mediametadatalist.php:231
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/media-metadata-list/lib/class-mediametadatalist.php:231

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: exif, media, metadata, thumbnails

media-metadata-list/mediametadatalist.php 92% from 13 tests

The primary PHP file in "Media Metadata List" version 2.02 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("media-metadata-list.php" instead of "mediametadatalist.php")

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
Good job! No executable or dangerous file extensions detected276 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23391276

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity49.00
▷ Minimum class complexity49.00
▷ Maximum class complexity49.00
Average method complexity10.60
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods360.00%
▷ Protected methods00.00%
▷ Private methods240.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected