41% ilab-media-tools

Code Review | Media Cloud for Amazon S3, Cloudflare R2, Google Cloud Storage, DigitalOcean Spaces and more

WordPress plugin Media Cloud for Amazon S3, Cloudflare R2, Google Cloud Storage, DigitalOcean Spaces and more scored41%from 54 tests.

About plugin

  • Plugin page: ilab-media-tools
  • Plugin version: 4.5.24
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Jul 12, 2016
  • Latest release: Sep 27, 2023
  • Number of updates: 344
  • Update frequency: every 7.7 days
  • Top authors: interfacelab (100%)

Code review

54 tests

User reviews

103 reviews

Install metrics

7,000+ active /422,749 total downloads

Benchmarks

Plugin footprint 47% from 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: ▲1.58MB] [CPU: ▲16.80ms] Passed 4 tests

A check of server-side resources used by Media Cloud for Amazon S3, Cloudflare R2, Google Cloud Storage, DigitalOcean Spaces and more
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.57 ▲1.1149.59 ▲8.17
Dashboard /wp-admin5.08 ▲1.7866.78 ▲17.36
Posts /wp-admin/edit.php5.13 ▲1.7771.36 ▲24.99
Add New Post /wp-admin/post-new.php7.60 ▲1.72102.90 ▲16.66
Media Library /wp-admin/upload.php4.94 ▲1.7266.27 ▲32.61
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius5.2155.24
Available Tasks /wp-admin/admin.php?page=media-cloud-tools5.1852.90
Fix Cloud Metadata /wp-admin/admin.php?page=mcloud-task-fix-metadata5.3458.51
Task Manager /wp-admin/admin.php?page=media-cloud-task-manager5.4657.46
Unlink From Cloud /wp-admin/admin.php?page=mcloud-task-unlink-media-task5.1553.26

Server storage [IO: ▲67.46MB] [DB: ▲0.08MB] 33% from 3 tests

Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
  • The plugin illegally modified 14 files (34.64KB) outside of "wp-content/plugins/ilab-media-tools/" and "wp-content/uploads/"
    • (new file) wp-content/mcloud-view-cache/6fc6391958ebd718dd874fca1bdc4a79fdf27a9c.php
    • (new file) wp-content/mcloud-view-cache/392a58f108b4e0b77b01121aeab150ed793a123a.php
    • (new file) wp-content/mcloud-view-cache/c75b9d0a58d9505b403e3ef297044df609eea058.php
    • (new file) wp-content/mcloud-view-cache/2ac7e6965dc1cf23a43e6138eabbf1015e39c172.php
    • (new file) wp-content/mcloud-view-cache/a9887f2cfe25d8a2a4cb90181e64bff7468c8fb5.php
    • (new file) wp-content/mcloud-view-cache/c07901fb291086ed59a7341c30beb149d046d0c1.php
    • (new file) wp-content/mcloud-view-cache/39da2b251e54713e7988f83f9031aca5749b5586.php
    • (new file) wp-content/mcloud-reports/.empty
    • (new file) wp-content/mcloud-view-cache/a4052da34ed380318ab0121df46f115b71076c32.php
    • (new file) wp-content/mcloud-view-cache/070729e89e785974a2039244c7ca126f4e07b4ef.php
    • ...
  • Total filesystem usage should be limited to 25MB (currently using 67.46MB)
Filesystem: 7,788 new files
Database: 4 new tables, 12 new options
New tables
wp_mcloud_task
wp_mcloud_task_schedule
wp_mcloud_task_data
wp_mcloud_task_token
New WordPress options
fs_accounts
mcloud-has-run
db_upgraded
fs_debug_mode
widget_recent-posts
widget_theysaidso_widget
fs_active_plugins
mcloud-pinned-tools
can_compress_scripts
widget_recent-comments
...

Browser metrics Passed 4 tests

A check of browser resources used by Media Cloud for Amazon S3, Cloudflare R2, Google Cloud Storage, DigitalOcean Spaces and more
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,027 ▲28120.74 ▲6.371.84 ▲0.1226.78 ▼15.98
Dashboard /wp-admin2,408 ▲22611.14 ▲6.21293.23 ▲190.9451.43 ▲10.50
Posts /wp-admin/edit.php2,318 ▲2298.12 ▲6.1080.45 ▲43.2942.69 ▲8.81
Add New Post /wp-admin/post-new.php1,538 ▲521.10 ▼2.36612.87 ▼35.5030.83 ▼26.71
Media Library /wp-admin/upload.php1,606 ▲22110.32 ▲6.19150.55 ▲49.8055.08 ▲12.33
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,2357.7474.1227.97
Tasks /wp-admin/admin.php?page=#280.440.064.10
Available Tasks /wp-admin/admin.php?page=media-cloud-tools1,2597.6771.9483.07
Fix Cloud Metadata /wp-admin/admin.php?page=mcloud-task-fix-metadata1,4487.7070.8178.94
Task Manager /wp-admin/admin.php?page=media-cloud-task-manager1,7767.8675.9881.69
Unlink From Cloud /wp-admin/admin.php?page=mcloud-task-unlink-media-task1,4107.8071.0574.93

Uninstaller [IO: ▲0.03MB] [DB: ▲0.08MB] 25% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/ilab-media-tools/external/Freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_mcloud_task_schedule
    • wp_mcloud_task
    • wp_mcloud_task_data
    • wp_mcloud_task_token
  • Zombie WordPress options were found after uninstall: 12 options
    • mcloud_show_wizard
    • theysaidso_admin_options
    • widget_recent-comments
    • mcloud-pinned-tools
    • can_compress_scripts
    • fs_active_plugins
    • db_upgraded
    • fs_debug_mode
    • mcloud-has-run
    • widget_recent-posts
    • ...

Smoke tests 25% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 299× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/ilab-media-tools/config/video-encoding.config.php
    • > /wp-content/plugins/ilab-media-tools/helpers/ilab-media-tool-geometry-helpers.php
    • > /wp-content/plugins/ilab-media-tools/classes/Utilities/Helpers.php
    • > /wp-content/plugins/ilab-media-tools/views/wizard/imgix/settings.blade.php
    • > /wp-content/plugins/ilab-media-tools/classes/Tools/Vision/VisionException.php
    • > /wp-content/plugins/ilab-media-tools/views/base/ui/circle-graph.blade.php
    • > /wp-content/plugins/ilab-media-tools/classes/Tools/Vision/VisionToolSettings.php
    • > /wp-content/plugins/ilab-media-tools/views/base/fields/image.blade.php
    • > /wp-content/plugins/ilab-media-tools/lib/mcloud-symfony/error-handler/Resources/views/trace.html.php
    • > /wp-content/plugins/ilab-media-tools/classes/Tools/Storage/StorageToolSettings.php
  • 3151× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'BC_PHPUnit_Framework_TestCase' not found in wp-content/plugins/ilab-media-tools/lib/mcloud-mikey179/vfsstream/src/test/php/org/bovigo/vfs/content/StringBasedFileContentTestCase.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'MediaCloud\\Vendor\\Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/ilab-media-tools/lib/mcloud-google/common-protos/src/Api/Billing.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'MediaCloud\\Vendor\\Symfony\\Component\\Validator\\Exception\\ValidatorException' not found in wp-content/plugins/ilab-media-tools/lib/mcloud-symfony/validator/Exception/MappingException.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'MediaCloud\\Vendor\\Symfony\\Component\\VarDumper\\Caster\\ConstStub' not found in wp-content/plugins/ilab-media-tools/lib/mcloud-symfony/var-dumper/Caster/LinkStub.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'MediaCloud\\Vendor\\Aws\\AwsClient' not found in wp-content/plugins/ilab-media-tools/lib/mcloud-aws/aws-sdk-php/src/PersonalizeRuntime/PersonalizeRuntimeClient.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'MediaCloud\\Vendor\\Grpc\\CallInvoker' not found in wp-content/plugins/ilab-media-tools/lib/mcloud-grpc/grpc/src/lib/DefaultCallInvoker.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'MediaCloud\\Vendor\\Symfony\\Component\\VarDumper\\Command\\Descriptor\\DumpDescriptorInterface' not found in wp-content/plugins/ilab-media-tools/lib/mcloud-symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'MediaCloud\\Vendor\\Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/ilab-media-tools/lib/mcloud-google/common-protos/src/Api/Expr/V1beta1/EnumValue.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'MediaCloud\\Vendor\\Symfony\\Component\\Serializer\\Mapping\\Loader\\LoaderInterface' not found in wp-content/plugins/ilab-media-tools/lib/mcloud-symfony/serializer/Mapping/Loader/LoaderChain.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'MediaCloud\\Vendor\\Symfony\\Component\\Mime\\Part\\AbstractPart' not found in wp-content/plugins/ilab-media-tools/lib/mcloud-symfony/mime/Part/TextPart.php:23

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=#
    • > Network (severe)
    wp-admin/admin.php?page=# - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 26 tag instead of maximum 10
You can take inspiration from this readme.txt

ilab-media-tools/ilab-media-tools.php 92% from 13 tests

"Media Cloud for Amazon S3, Cloudflare R2, Google Cloud Storage, DigitalOcean Spaces and more" version 4.5.24's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 150 characters long)

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Please make sure to remedy the following
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/ilab-media-tools/lib/mcloud-nesbot/carbon/bin/carbon.bat
      • wp-content/plugins/ilab-media-tools/lib/mcloud-aws/aws-crt-php/run_tests.bat
    • .exe - Executable in Windows
      • wp-content/plugins/ilab-media-tools/lib/mcloud-symfony/console/Resources/bin/hiddeninput.exe
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/ilab-media-tools/lib/mcloud-shortpixel/shortpixel-php/lib/data/shortpixel.crt
501,004 lines of code in 7,312 files:
LanguageFilesBlank linesComment linesLines of code
PHP6,68390,064280,729437,012
JSON1600028,340
XML560121,764
Blade169214254,009
XSD7175503,533
Markdown2657002,013
JavaScript291131,0221,297
C122851591,014
CSS243456508
C/C++ Header311556466
Bourne Shell93321249
SVG10605179
YAML5910112
make4302487
Bourne Again Shell3151472
Protocol Buffers2143864
m42151860
reStructuredText1352959
GLSL117055
Python1164554
Dockerfile314227
Pascal151514
diff12127
DOS Batch2206
INI2003

PHP code 0% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity11.63
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces1,239
Interfaces477
Traits202
Classes4,143
▷ Abstract classes1593.84%
▷ Concrete classes3,98496.16%
▷ Final classes3629.09%
Methods28,351
▷ Static methods3,87213.66%
▷ Public methods23,65183.42%
▷ Protected methods1,8376.48%
▷ Private methods2,86310.10%
Functions2,352
▷ Named functions60725.81%
▷ Anonymous functions1,74574.19%
Constants2,647
▷ Global constants27610.43%
▷ Class constants2,37189.57%
▷ Public constants2,15690.93%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
26 PNG files occupy 0.49MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/wm-align-bottom-left.png19.52KB0.14KB▼ 99.28%
external/Freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
public/img/ilab-imgix-red-eye.png14.70KB1.02KB▼ 93.06%
public/img/wm-align-bottom-right.png19.51KB0.14KB▼ 99.27%
external/Freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%