83% infinite-uploads

Code Review | Infinite Uploads - Offload Media and Video to Cloud Storage

WordPress plugin Infinite Uploads - Offload Media and Video to Cloud Storage scored83%from 54 tests.

About plugin

  • Plugin page: infinite-uploads
  • Plugin version: 2.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Feb 8, 2021
  • Latest release: Oct 25, 2023
  • Number of updates: 25
  • Update frequency: every 39.8 days
  • Top authors: uglyrobot (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

600+ active /14,302 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
Installer ran successfully

Server metrics [RAM: ▲1.17MB] [CPU: ▼3.55ms] Passed 4 tests

This is a short check of server-side resources used by Infinite Uploads - Offload Media and Video to Cloud Storage
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.66 ▲1.1942.17 ▲4.91
Dashboard /wp-admin4.49 ▲1.1449.99 ▼10.53
Posts /wp-admin/edit.php4.54 ▲1.1849.31 ▼2.95
Add New Post /wp-admin/post-new.php7.07 ▲1.1887.82 ▼5.61
Media Library /wp-admin/upload.php4.41 ▲1.1843.18 ▲9.94

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 1,174 new files
Database: 1 new table, 7 new options
New tables
wp_infinite_uploads_files
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
iup_installed
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Infinite Uploads - Offload Media and Video to Cloud Storage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8814.35 ▼0.381.55 ▼0.0737.76 ▼4.43
Dashboard /wp-admin2,240 ▲695.58 ▲0.0280.95 ▼9.0373.97 ▲34.29
Posts /wp-admin/edit.php2,143 ▲401.97 ▼0.0432.48 ▼4.7535.19 ▲1.05
Add New Post /wp-admin/post-new.php1,722 ▲19621.11 ▼2.64723.96 ▲34.2957.12 ▼12.22
Media Library /wp-admin/upload.php1,445 ▲484.18 ▼0.0294.82 ▼37.1473.04 ▲9.40

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% 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 | 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
  • 190× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'UglyRobot\\Infinite_Uploads\\GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/infinite-uploads/vendor/Aws3/Aws/CommandPool.php:13
    • > PHP Fatal error
      Trait 'UglyRobot\\Infinite_Uploads\\Aws\\Api\\Parser\\PayloadParserTrait' not found in wp-content/plugins/infinite-uploads/vendor/Aws3/Aws/Api/ErrorParser/JsonParserTrait.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/infinite-uploads/inc/templates/welcome.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'UglyRobot\\Infinite_Uploads\\Aws\\Multipart\\AbstractUploadManager' not found in wp-content/plugins/infinite-uploads/vendor/Aws3/Aws/S3/MultipartCopy.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'UglyRobot\\Infinite_Uploads\\Aws\\Api\\ErrorParser\\AbstractErrorParser' not found in wp-content/plugins/infinite-uploads/vendor/Aws3/Aws/Api/ErrorParser/JsonRpcErrorParser.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'UglyRobot\\Infinite_Uploads\\Aws\\Signature\\SignatureV4' not found in wp-content/plugins/infinite-uploads/vendor/Aws3/Aws/Signature/S3SignatureV4.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'UglyRobot\\Infinite_Uploads\\Aws\\MonitoringEventsInterface' not found in wp-content/plugins/infinite-uploads/vendor/Aws3/Aws/S3/Exception/DeleteMultipleObjectsException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'UglyRobot\\Infinite_Uploads\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/infinite-uploads/vendor/Aws3/Aws/Handler/GuzzleV5/PsrStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'UglyRobot\\Infinite_Uploads\\Aws\\Api\\ErrorParser\\AbstractErrorParser' not found in wp-content/plugins/infinite-uploads/vendor/Aws3/Aws/Api/ErrorParser/RestJsonErrorParser.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'UglyRobot\\Infinite_Uploads\\GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/infinite-uploads/vendor/Aws3/GuzzleHttp/Promise/Coroutine.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

infinite-uploads/infinite-uploads.php 85% from 13 tests

"Infinite Uploads - Offload Media and Video to Cloud Storage" version 2.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires PHP: The required version number must match the one declared in readme.txt ("5.6" instead of "7.0")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 180 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin67,108 lines of code in 1,160 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,0982,34817,57031,428
CSS101,5414413,215
JavaScript162,1861,81911,755
Markdown32,33306,389
HTML213601,972
JSX1284151,530
SVG1401609
Sass3231132
JSON20078

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity13.59
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces42
Interfaces43
Traits23
Classes276
▷ Abstract classes134.71%
▷ Concrete classes26395.29%
▷ Final classes259.51%
Methods2,392
▷ Static methods38316.01%
▷ Public methods1,65068.98%
▷ Protected methods1385.77%
▷ Private methods60425.25%
Functions441
▷ Named functions8819.95%
▷ Anonymous functions35380.05%
Constants286
▷ Global constants4616.08%
▷ Class constants24083.92%
▷ Public constants240100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin