84% remote-medias-lite

Code Review | Remote Media Libraries

WordPress plugin Remote Media Libraries scored84%from 54 tests.

About plugin

  • Plugin page: remote-medias-lite
  • Plugin version: 1.6.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 18, 2014
  • Latest release: Oct 4, 2018
  • Number of updates: 59
  • Update frequency: every 32.1 days
  • Top authors: loumray (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

400+ active /43,605 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.41MB] [CPU: ▲7.21ms] Passed 4 tests

Analyzing server-side resources used by Remote Media Libraries
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.57 ▲1.1147.29 ▲8.32
Dashboard /wp-admin4.82 ▲1.5159.82 ▲8.56
Posts /wp-admin/edit.php4.87 ▲1.5256.32 ▲9.70
Add New Post /wp-admin/post-new.php7.43 ▲1.55107.38 ▲2.25
Media Library /wp-admin/upload.php4.74 ▲1.5250.79 ▲18.68
Remote Libraries /wp-admin/edit.php?post_type=rmlaccounts4.7943.85

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 758 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Remote Media Libraries
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲17513.45 ▼1.141.77 ▼0.0842.68 ▼1.77
Dashboard /wp-admin2,321 ▲1364.98 ▲0.12104.64 ▼2.2739.15 ▼5.86
Posts /wp-admin/edit.php2,209 ▲1202.36 ▲0.3845.28 ▲9.0634.85 ▲0.26
Add New Post /wp-admin/post-new.php1,599 ▲6623.46 ▲0.09612.39 ▲4.8632.22 ▼32.02
Media Library /wp-admin/upload.php1,529 ▲1474.52 ▲0.33107.97 ▲5.5346.83 ▲3.24
Remote Libraries /wp-admin/edit.php?post_type=rmlaccounts1,1732.3045.1532.81

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 511× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPRemoteMediaExt\\Guzzle\\Tests\\GuzzleTestCase' not found in wp-content/plugins/remote-medias-lite/vendor/guzzle/guzzle/tests/Guzzle/Tests/Batch/BatchSizeDivisorTest.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WPRemoteMediaExt\\Guzzle\\Tests\\GuzzleTestCase' not found in wp-content/plugins/remote-medias-lite/vendor/guzzle/guzzle/tests/Guzzle/Tests/Plugin/Async/AsyncPluginTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WPRemoteMediaExt\\Guzzle\\Tests\\GuzzleTestCase' not found in wp-content/plugins/remote-medias-lite/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Builder/ServiceBuilderTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WPRemoteMediaExt\\Guzzle\\Tests\\Parser\\Message\\MessageParserProvider' not found in wp-content/plugins/remote-medias-lite/vendor/guzzle/guzzle/tests/Guzzle/Tests/Parser/Message/MessageParserTest.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/remote-medias-lite/views/admin/media-activation-gdrive.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'WPRemoteMediaExt\\Guzzle\\Stream\\StreamInterface' not found in wp-content/plugins/remote-medias-lite/vendor/guzzle/guzzle/src/Guzzle/Http/EntityBodyInterface.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WPRemoteMediaExt\\Symfony\\Component\\EventDispatcher\\Event' not found in wp-content/plugins/remote-medias-lite/vendor/symfony/event-dispatcher/GenericEvent.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WPRemoteMediaExt\\Guzzle\\Tests\\GuzzleTestCase' not found in wp-content/plugins/remote-medias-lite/vendor/guzzle/guzzle/tests/Guzzle/Tests/Log/ClosureLogAdapterTest.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'WPRemoteMediaExt\\Guzzle\\Service\\ConfigLoaderInterface' not found in wp-content/plugins/remote-medias-lite/vendor/guzzle/guzzle/src/Guzzle/Service/CachingConfigLoader.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'WPRemoteMediaExt\\Symfony\\Component\\EventDispatcher\\EventDispatcherInterface' not found in wp-content/plugins/remote-medias-lite/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

remote-medias-lite/remote-medias-libs.php 92% from 13 tests

Analyzing the main PHP file in "Remote Media Libraries" version 1.6.3
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 ("remote-medias-lite.php" instead of "remote-medias-libs.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin50,095 lines of code in 735 files:
LanguageFilesBlank linesComment linesLines of code
PHP6058,56113,61542,970
reStructuredText301,2361,7941,824
JSON431301,724
Markdown1028801,364
JavaScript26145147995
CSS96716649
XML53111235
make1245124
HTML216092
Python1222350
Ant110134
YAML13019
Sass12215

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.19
Average class complexity5.93
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces117
Interfaces62
Traits2
Classes541
▷ Abstract classes336.10%
▷ Concrete classes50893.90%
▷ Final classes10.20%
Methods3,865
▷ Static methods1533.96%
▷ Public methods3,60593.27%
▷ Protected methods2245.80%
▷ Private methods360.93%
Functions160
▷ Named functions31.88%
▷ Anonymous functions15798.12%
Constants93
▷ Global constants00.00%
▷ Class constants93100.00%
▷ Public constants93100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.25MB with 0.11MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo.png7.47KB3.65KB▼ 51.07%
vendor/guzzle/guzzle/docs/_static/guzzle-icon.png0.78KB0.94KB0.00%
vendor/guzzle/guzzle/docs/_static/logo.png242.92KB69.68KB▼ 71.32%
assets/img/logo-dev.png8.37KB4.18KB▼ 50.06%