10% nexlogiq-amazon-s3-links-generator

Code Review | NexLogiQ Amazon S3 Links Generator

WordPress plugin NexLogiQ Amazon S3 Links Generator scored10%from 54 tests.

About plugin

  • Plugin page: nexlogiq-amazon-s...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 23, 2020
  • Latest release: Jul 24, 2020
  • Number of updates: 55
  • Update frequency: every 0.1 days
  • Top authors: nexlogiq (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /421 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/nexlogiq-amazon-s3-links-generator/nex-aws-link-generate.php+29
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.57MB] [CPU: ▼48.88ms] Passed 4 tests

Server-side resources used by NexLogiQ Amazon S3 Links Generator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.42 ▼1.047.73 ▼32.33
Dashboard /wp-admin2.44 ▼0.8611.78 ▼38.85
Posts /wp-admin/edit.php2.44 ▼0.9211.38 ▼40.70
Add New Post /wp-admin/post-new.php2.44 ▼3.459.64 ▼83.63
Media Library /wp-admin/upload.php2.44 ▼0.7910.51 ▼25.21
All AWS Links /wp-admin/edit.php?post_type=nex_aws_link2.4410.27
NexLogiQ AWS /wp-admin/options-general.php?page=nex-aws-link2.4411.31
Add New /wp-admin/post-new.php?post_type=nex_aws_link2.449.96

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 1,514 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for NexLogiQ Amazon S3 Links Generator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲3714.24 ▼0.111.67 ▼0.0944.47 ▲3.13
Dashboard /wp-admin2,226 ▲465.59 ▼0.0885.26 ▼6.7441.00 ▲2.02
Posts /wp-admin/edit.php2,131 ▲282.00 ▼0.0340.19 ▲0.4836.35 ▼2.35
Add New Post /wp-admin/post-new.php1,561 ▲2417.99 ▼0.27647.26 ▼12.0258.54 ▼2.61
Media Library /wp-admin/upload.php1,434 ▲314.15 ▼0.00102.74 ▼1.3346.86 ▲2.26
All AWS Links /wp-admin/edit.php?post_type=nex_aws_link1,0951.9630.0633.56
NexLogiQ AWS /wp-admin/options-general.php?page=nex-aws-link8202.0325.0627.06
Add New /wp-admin/post-new.php?post_type=nex_aws_link1,4952.4950.1758.63

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/nexlogiq-amazon-s3-links-generator/nex-aws-link-generate.php+29
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=nex_aws_link
    • > Notice in wp-content/plugins/nexlogiq-amazon-s3-links-generator/nex-aws-link-generate.php+30
    Trying to access array offset on value of type bool

SRP 0% 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
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/nexlogiq-amazon-s3-links-generator/vendor/bin/jp.php
    • > /wp-content/plugins/nexlogiq-amazon-s3-links-generator/vendor/mtdowling/jmespath.php/bin/jp.php
  • 619× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/nexlogiq-amazon-s3-links-generator/vendor/aws/aws-sdk-php/src/ApplicationInsights/ApplicationInsightsClient.php:63
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/nexlogiq-amazon-s3-links-generator/vendor/aws/aws-sdk-php/src/OpsWorks/OpsWorksClient.php:158
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\ClientInterface' not found in wp-content/plugins/nexlogiq-amazon-s3-links-generator/vendor/guzzlehttp/guzzle/src/Client.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/nexlogiq-amazon-s3-links-generator/vendor/aws/aws-sdk-php/src/Sts/StsClient.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/nexlogiq-amazon-s3-links-generator/vendor/aws/aws-sdk-php/src/Support/SupportClient.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/nexlogiq-amazon-s3-links-generator/vendor/aws/aws-sdk-php/src/CodeCommit/CodeCommitClient.php:164
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/nexlogiq-amazon-s3-links-generator/vendor/aws/aws-sdk-php/src/CloudTrail/CloudTrailClient.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/nexlogiq-amazon-s3-links-generator/vendor/aws/aws-sdk-php/src/DatabaseMigrationService/Exception/DatabaseMigrationServiceException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AbstractConfigurationProvider' not found in wp-content/plugins/nexlogiq-amazon-s3-links-generator/vendor/aws/aws-sdk-php/src/Retry/ConfigurationProvider.php:45
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\Crypto\\Cipher\\CipherMethod' not found in wp-content/plugins/nexlogiq-amazon-s3-links-generator/vendor/aws/aws-sdk-php/src/Crypto/Cipher/Cbc.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: Please take inspiration from this readme.txt

nexlogiq-amazon-s3-links-generator/nex-aws-link-generate.php 85% from 13 tests

Analyzing the main PHP file in "NexLogiQ Amazon S3 Links Generator" version 1.0.0
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("nexlogiq-amazon-s3-links-generator.php" instead of "nex-aws-link-generate.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Almost there! Just fix the following issues
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/nexlogiq-amazon-s3-links-generator/vendor/bin/jp.php.bat
47,693 lines of code in 1,502 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,4486,66732,23537,317
JSON32806,712
Markdown161,13803,538
reStructuredText1352959
YAML14027
make210022
XML13014
DOS Batch1004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity5.56
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces491
Interfaces42
Traits20
Classes725
▷ Abstract classes111.52%
▷ Concrete classes71498.48%
▷ Final classes141.96%
Methods2,364
▷ Static methods37715.95%
▷ Public methods1,66570.43%
▷ Protected methods1174.95%
▷ Private methods58224.62%
Functions475
▷ Named functions12826.95%
▷ Anonymous functions34773.05%
Constants214
▷ Global constants73.27%
▷ Class constants20796.73%
▷ Public constants207100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected