78% uber-media

Code Review | Media Manager Plus

WordPress plugin Media Manager Plus scored78%from 54 tests.

About plugin

  • Plugin page: uber-media
  • Plugin version: 1.4.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 6.3.1
  • First release: Apr 9, 2013
  • Latest release: Jul 28, 2021
  • Number of updates: 26
  • Update frequency: every 117.0 days
  • Top authors: dev7studios (38.46%)machothemes (30.77%)giucu91 (19.23%)polevaultweb (19.23%)codeinwp (7.69%)

Code review

54 tests

User reviews

10 reviews

Install metrics

200+ active /22,031 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▲580.72ms] 50% from 4 tests

Server-side resources used by Media Manager Plus
It is recommended to improve the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 736.11ms on /wp-admin/index.php?page=mmp-support)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 580.72ms on /wp-admin/index.php?page=mmp-support)
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1439.81 ▲0.74
Dashboard /wp-admin3.49 ▲0.19955.20 ▲901.51
Posts /wp-admin/edit.php3.55 ▲0.19913.07 ▲849.63
Add New Post /wp-admin/post-new.php6.07 ▲0.18669.93 ▲571.00
Media Library /wp-admin/upload.php3.38 ▲0.151,293.40 ▲1,255.20
Media Manager Plus /wp-admin/index.php?page=mmp-welcome3.38717.66
Media Manager Plus /wp-admin/upload.php?page=uber-media3.669,592.96
Media Manager Plus /wp-admin/index.php?page=mmp-support3.38736.11

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Media Manager Plus
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲21314.47 ▼0.292.15 ▲0.4341.00 ▼2.83
Dashboard /wp-admin2,355 ▲1786.16 ▲0.59104.69 ▲13.0438.83 ▼3.52
Posts /wp-admin/edit.php2,287 ▲1843.44 ▲1.5047.57 ▲10.9434.99 ▼3.08
Add New Post /wp-admin/post-new.php1,558 ▲2522.01 ▼0.65649.36 ▼14.4837.61 ▼22.58
Media Library /wp-admin/upload.php1,409 ▲94.26 ▲0.0986.66 ▼27.8648.84 ▼0.72
Media Manager Plus /wp-admin/index.php?page=mmp-welcome9843.0741.6033.09
Media Manager Plus /wp-admin/upload.php?page=uber-media1,1853.3744.2128.74
Media Manager Plus /wp-admin/index.php?page=mmp-support1,0643.0742.8239.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • mmp_version
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/uber-media/includes/sources/instagram.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/uber-media/includes/sources/500px.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/uber-media/includes/uber-media-settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/uber-media/uber-media.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/uber-media/includes/sources/dribbble.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/uber-media/includes/sources/flickr.php:23

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/upload.php?page=uber-media
    • > Network (severe)
    chrome-error://chromewebdata/ - Failed to load resource: the server responded with a status of 400 ()
    • > GET request to /wp-admin/upload.php?page=uber-media
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://www.instagram.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

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:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
You can take inspiration from this readme.txt

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

This is the main PHP file of "Media Manager Plus" version 1.4.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
85 characters long description:
Upgrade the WordPress Media Manager and add support for Flickr, Instagram, 500px etc.

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
Success! There were no dangerous files found in this plugin2,903 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP93731,1041,674
JavaScript118615967
CSS14139153
PO File14143109

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity19.56
▷ Minimum class complexity1.00
▷ Maximum class complexity92.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes211.11%
▷ Concrete classes1688.89%
▷ Final classes00.00%
Methods159
▷ Static methods106.29%
▷ Public methods14088.05%
▷ Protected methods21.26%
▷ Private methods1710.69%
Functions10
▷ Named functions10100.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
4 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/500px.png7.60KB2.48KB▼ 67.36%
assets/img/flickr.png6.01KB2.28KB▼ 62.05%
assets/img/instagram.png43.59KB12.89KB▼ 70.44%
assets/img/dribbble.png24.44KB11.02KB▼ 54.93%