94% default-media-view

Code Review | Default Media Library View

WordPress plugin Default Media Library View scored 94% from 54 tests.

About plugin

  • Plugin page: default-media-view
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 5.8.1
  • First release: Oct 8, 2015
  • Latest release: Oct 8, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: milleronic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 681 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Default Media Library View
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0134.38 ▼0.93
Dashboard /wp-admin3.07 ▲0.0245.93 ▼1.09
Posts /wp-admin/edit.php3.12 ▲0.0243.78 ▲0.59
Add New Post /wp-admin/post-new.php5.43 ▼0.0092.92 ▼551.84
Media Library /wp-admin/upload.php3.01 ▲0.0133.13 ▼2.49

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Default Media Library View
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲10716.14 ▲0.598.69 ▼1.4747.51 ▲0.75
Dashboard /wp-admin2,967 ▲305.92 ▼0.06149.21 ▲1.98102.36 ▼7.84
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0070.41 ▲5.3587.12 ▼0.49
Add New Post /wp-admin/post-new.php1,615 ▲3421.11 ▲6.71300.61 ▼97.24104.11 ▼8.45
Media Library /wp-admin/upload.php1,807 ▼05.04 ▼0.01151.45 ▲0.56114.85 ▲1.21

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
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/default-media-view/default-media-view.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found


Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Screenshot showing output in the user profile admin area.) image required
  • Donate link: Invalid URI ("")
The official readme.txt might help

default-media-view/default-media-view.php Passed 13 tests

The principal PHP file in "Default Media Library View" v. 1.0 is loaded by WordPress automatically on each request
61 characters long description:
Adds a media library view selection to the user profile page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected38 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods125.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot.png6.10KB3.37KB▼ 44.76%