84% default-media-uploader-view

Code Review | Default Media Uploader View

WordPress plugin Default Media Uploader View scored84%from 54 tests.

About plugin

  • Plugin page: default-media-upl...
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.2
  • WordPress version: 6.3.1
  • First release: Jul 19, 2014
  • Latest release: May 16, 2019
  • Number of updates: 43
  • Update frequency: every 41.0 days
  • Top authors: leemon (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

800+ active /13,367 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼0.53ms] Passed 4 tests

This is a short check of server-side resources used by Default Media Uploader View
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.05 ▲0.19
Dashboard /wp-admin3.31 ▲0.0144.50 ▼5.05
Posts /wp-admin/edit.php3.36 ▲0.0144.47 ▼2.69
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.63 ▲9.52
Media Library /wp-admin/upload.php3.24 ▲0.0139.22 ▲5.43

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Default Media Uploader View
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.144.89 ▲2.9844.53 ▼5.02
Dashboard /wp-admin2,206 ▲185.88 ▲0.98106.82 ▼7.0539.04 ▼3.94
Posts /wp-admin/edit.php2,092 ▲32.00 ▲0.0039.63 ▲3.8935.25 ▼0.63
Add New Post /wp-admin/post-new.php1,516 ▲217.69 ▲0.24634.74 ▼75.3155.34 ▼5.07
Media Library /wp-admin/upload.php1,390 ▲24.25 ▼0.0196.70 ▼11.6242.53 ▼3.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please 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 add_action() in wp-content/plugins/default-media-uploader-view/default-media-uploader-view.php:89

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, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
8 plugin tags: attachments, filter, view, images, posts...

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

The principal PHP file in "Default Media Uploader View" v. 1.0.8 is loaded by WordPress automatically on each request
99 characters long description:
Sets "Uploaded to this post" instead of "All media items" as the default view in the media uploader

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected74 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript118155
PHP1234919

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods4100.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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin