78% advanced-media-manager

Code Review | Advanced Media Manager

WordPress plugin Advanced Media Manager scored 78% from 54 tests.

About plugin

  • Plugin page: advanced-media-ma...
  • Plugin version: 0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 5.9.2
  • First release: Feb 13, 2021
  • Latest release: Feb 13, 2021
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: smackcoders (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 264 total downloads


Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.66MB] [CPU: ▼296.69ms] Passed 4 tests

Analyzing server-side resources used by Advanced Media Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.20 ▲0.6865.96 ▲13.70
Dashboard /wp-admin4.10 ▲0.6941.42 ▲8.98
Posts /wp-admin/edit.php4.33 ▲0.6845.52 ▲6.97
Add New Post /wp-admin/post-new.php7.56 ▲0.59106.15 ▼1,208.47
Media Library /wp-admin/upload.php3.98 ▲0.6831.20 ▲5.76

Server storage [IO: ▲25.93MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please fix the following
  • Filesystem usage must be lower than 25MB (currently using 25.93MB)
Filesystem: 2,425 new files
Database: 3 new tables, no new options
New tables

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Media Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,815 ▲6115.19 ▼0.457.50 ▲1.253.38 ▼0.36
Dashboard /wp-admin2,912 ▲516.13 ▼0.04131.56 ▼2.59163.09 ▲5.77
Posts /wp-admin/edit.php2,711 ▲233.24 ▲0.0066.73 ▲2.03192.81 ▲45.10
Add New Post /wp-admin/post-new.php1,773 ▲11222.24 ▲4.85455.67 ▲68.66186.28 ▲2.51
Media Library /wp-admin/upload.php1,718 ▲205.55 ▲0.08148.14 ▲10.29195.79 ▲7.88

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
  • Zombie tables were found after uninstall: 3 tables
    • wp_digital_bucket_manager
    • wp_storage_bucket_manager
    • wp_amazon_bucket_manager

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/advanced-media-manager/vendor/mtdowling/jmespath.php/bin/jp.php
  • 1010× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/advanced-media-manager/vendor/sociallydev/spaces-api/aws/Aws/MachineLearning/MachineLearningClient.php:69
    • > PHP Fatal error
      Trait 'Aws\\Api\\Parser\\PayloadParserTrait' not found in wp-content/plugins/advanced-media-manager/vendor/sociallydev/spaces-api/aws/Aws/Api/ErrorParser/XmlErrorParser.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/advanced-media-manager/vendor/aws/aws-sdk-php/src/Acm/AcmClient.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/advanced-media-manager/vendor/mtdowling/jmespath.php/tests/TreeInterpreterTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/advanced-media-manager/vendor/aws/aws-sdk-php/src/AutoScalingPlans/AutoScalingPlansClient.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/advanced-media-manager/vendor/sociallydev/spaces-api/aws/GuzzleHttp/Exception/ConnectException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/advanced-media-manager/vendor/aws/aws-sdk-php/src/Kinesis/Exception/KinesisException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/advanced-media-manager/vendor/sociallydev/spaces-api/aws/GuzzleHttp/Exception/RequestException.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/advanced-media-manager/vendor/aws/aws-sdk-php/src/IoTThingsGraph/IoTThingsGraphClient.php:79
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/advanced-media-manager/vendor/sociallydev/spaces-api/aws/Aws/ApplicationDiscoveryService/Exception/ApplicationDiscoveryServiceException.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Cloud Storage Provider Configuration.), #2 (Bucket Section.), #3 (Storage Settings.)
The official readme.txt is a good inspiration

advanced-media-manager/advanced-media-manager.php Passed 13 tests

Analyzing the main PHP file in "Advanced Media Manager" version 0.1
74 characters long description:
Automatically store wp media uploads to Amazon S3 and DigitalOcean Spaces.

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 plugin74,898 lines of code in 1,947 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity5.77
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
▷ Abstract classes211.71%
▷ Concrete classes1,20498.29%
▷ Final classes433.57%
▷ Static methods59813.81%
▷ Public methods3,07270.93%
▷ Protected methods2034.69%
▷ Private methods1,05624.38%
▷ Named functions18621.91%
▷ Anonymous functions66378.09%
▷ Global constants51.43%
▷ Class constants34598.57%
▷ Public constants345100.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
41 compressed PNG files occupy 0.25MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wp-ultimate-csv-importer.png1.25KB0.95KB▼ 23.53%
assets/images/google-cloud.png2.11KB1.15KB▼ 45.23%