68% acf-s3-media-files

Code Review | Advanced Custom Fields: ACF S3 Media Files

WordPress plugin Advanced Custom Fields: ACF S3 Media Files scored68%from 54 tests.

About plugin

  • Plugin page: acf-s3-media-files
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.9
  • WordPress version: 6.3.1
  • First release: Feb 6, 2021
  • Latest release: Apr 8, 2022
  • Number of updates: 24
  • Update frequency: every 17.8 days
  • Top authors: codemenschen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,304 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▼5.26ms] Passed 4 tests

A check of server-side resources used by Advanced Custom Fields: ACF S3 Media Files
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3247.82 ▲2.90
Dashboard /wp-admin3.64 ▲0.2954.91 ▼10.48
Posts /wp-admin/edit.php3.69 ▲0.3357.05 ▲7.18
Add New Post /wp-admin/post-new.php6.15 ▲0.2690.90 ▼18.66
Media Library /wp-admin/upload.php3.50 ▲0.2638.74 ▲5.21

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 1,988 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Custom Fields: ACF S3 Media Files
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲3614.72 ▲0.371.86 ▼0.1042.45 ▲0.52
Dashboard /wp-admin2,210 ▲335.62 ▲0.0394.42 ▲5.9443.32 ▲4.24
Posts /wp-admin/edit.php2,118 ▲152.02 ▲0.0235.43 ▼5.8534.62 ▼3.93
Add New Post /wp-admin/post-new.php1,541 ▲1022.97 ▼0.12605.04 ▼6.3154.88 ▲5.67
Media Library /wp-admin/upload.php1,412 ▲124.20 ▲0.0198.17 ▼6.0841.56 ▼5.28

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

Smoke tests 50% 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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/acf-s3-media-files/vendor/mtdowling/jmespath.php/bin/jp.php
    • > /wp-content/plugins/acf-s3-media-files/vendor/bin/jp.php
  • 820× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/acf-s3-media-files/vendor/aws/aws-sdk-php/src/WorkDocs/Exception/WorkDocsException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\Signature\\SignatureInterface' not found in wp-content/plugins/acf-s3-media-files/vendor/aws/aws-sdk-php/src/Signature/AnonymousSignature.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/acf-s3-media-files/vendor/aws/aws-sdk-php/src/Ecs/Exception/EcsException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/acf-s3-media-files/vendor/aws/aws-sdk-php/src/DeviceFarm/Exception/DeviceFarmException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/acf-s3-media-files/vendor/aws/aws-sdk-php/src/Lightsail/LightsailClient.php:315
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/acf-s3-media-files/vendor/aws/aws-sdk-php/src/SavingsPlans/SavingsPlansClient.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/acf-s3-media-files/vendor/aws/aws-sdk-php/src/CloudWatchRUM/CloudWatchRUMClient.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/acf-s3-media-files/vendor/aws/aws-sdk-php/src/CodeGuruReviewer/Exception/CodeGuruReviewerException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/acf-s3-media-files/vendor/aws/aws-sdk-php/src/CodeStarNotifications/Exception/CodeStarNotificationsException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\S3\\UseArnRegion\\ConfigurationInterface' not found in wp-content/plugins/acf-s3-media-files/vendor/aws/aws-sdk-php/src/S3/UseArnRegion/Configuration.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: acf s3 media, s3, s3 media, field s3, acf s3...

acf-s3-media-files/plugin.php 92% from 13 tests

The principal PHP file in "Advanced Custom Fields: ACF S3 Media Files" v. 1.1.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("acf-s3-media-files.php" instead of "plugin.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Please make sure to remedy the following
  • For security reasons, never distribute binary or executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/acf-s3-media-files/vendor/bin/jp.php.bat
      • wp-content/plugins/acf-s3-media-files/vendor/aws/aws-crt-php/run_tests.bat
54,091 lines of code in 1,954 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,8758,24242,89746,166
Markdown271,32603,816
JSON15601,556
C1025089882
C/C++ Header210538441
JavaScript478175368
CSS290283
YAML53057198
Bourne Shell3194176
reStructuredText1352959
GLSL117055
XML10024
m414422
Pascal151514
Bourne Again Shell15013
make1409
DOS Batch2206
INI2003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity5.31
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces659
Interfaces60
Traits26
Classes950
▷ Abstract classes171.79%
▷ Concrete classes93398.21%
▷ Final classes576.11%
Methods2,852
▷ Static methods53718.83%
▷ Public methods2,10173.67%
▷ Protected methods1374.80%
▷ Private methods61421.53%
Functions598
▷ Named functions19632.78%
▷ Anonymous functions40267.22%
Constants259
▷ Global constants31.16%
▷ Class constants25698.84%
▷ Public constants24595.70%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/conversation.png1.24KB0.99KB▼ 20.09%
assets/images/skype.png1.16KB0.90KB▼ 22.16%
assets/images/ticket.png0.79KB0.54KB▼ 31.59%
assets/images/email.png0.89KB0.65KB▼ 27.14%