84% windows-azure-storage

Code Review | Microsoft Azure Storage for WordPress

WordPress plugin Microsoft Azure Storage for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: windows-azure-sto...
  • Plugin version: 4.4.0
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3
  • WordPress version: 6.3.1
  • First release: May 20, 2010
  • Latest release: Oct 17, 2023
  • Number of updates: 59
  • Update frequency: every 83.0 days
  • Top authors: satish_nikam (22.03%)suchawla (16.95%)morganestes (15.25%)Eugene.Manuilov (13.56%)10up (10.17%)

Code review

54 tests

User reviews

12 reviews

Install metrics

2,000+ active /74,514 total downloads

Benchmarks

Plugin footprint 83% 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: ▼0.01MB] [CPU: ▼5.40ms] Passed 4 tests

Analyzing server-side resources used by Microsoft Azure Storage for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.79 ▲0.30
Dashboard /wp-admin3.31 ▼0.0444.99 ▼15.59
Posts /wp-admin/edit.php3.36 ▲0.0043.46 ▼2.70
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.68 ▼3.60
Media Library /wp-admin/upload.php3.23 ▲0.0036.90 ▲4.51

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 272 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Microsoft Azure Storage for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.26 ▼0.461.72 ▲0.1242.67 ▲1.94
Dashboard /wp-admin2,198 ▲185.62 ▼0.0586.95 ▼0.1042.92 ▲3.46
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0834.47 ▼0.0234.15 ▼3.22
Add New Post /wp-admin/post-new.php1,526 ▼022.99 ▲0.11602.65 ▼76.9353.27 ▼13.37
Media Library /wp-admin/upload.php1,394 ▼64.17 ▼0.0597.74 ▼7.4142.54 ▼3.85

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 106× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/windows-azure-storage/vendor/guzzlehttp/psr7/src/FnStream.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/windows-azure-storage/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/windows-azure-storage/vendor/psr/http-client/src/RequestExceptionInterface.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'MicrosoftAzure\\Storage\\Common\\Models\\ServiceOptions' not found in wp-content/plugins/windows-azure-storage/vendor/microsoft/azure-storage-blob/src/Blob/Models/BlobServiceOptions.php:39
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/windows-azure-storage/vendor/guzzlehttp/psr7/src/DroppingStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/windows-azure-storage/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'MicrosoftAzure\\Storage\\Common\\Internal\\Authentication\\IAuthScheme' not found in wp-content/plugins/windows-azure-storage/vendor/microsoft/azure-storage-common/src/Common/Internal/Authentication/TokenAuthScheme.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'MicrosoftAzure\\Storage\\Blob\\Models\\BlobServiceOptions' not found in wp-content/plugins/windows-azure-storage/vendor/microsoft/azure-storage-blob/src/Blob/Models/GetBlobOptions.php:40
    • > PHP Fatal error
      Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.4.16. in wp-content/plugins/windows-azure-storage/vendor/composer/platform_check.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'MicrosoftAzure\\Storage\\Blob\\Models\\BlobServiceOptions' not found in wp-content/plugins/windows-azure-storage/vendor/microsoft/azure-storage-blob/src/Blob/Models/CreateBlobOptions.php:39

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
8 plugin tags: cdn, upload, media files, microsoft azure storage, blob storage...

windows-azure-storage/windows-azure-storage.php 92% from 13 tests

The main PHP script in "Microsoft Azure Storage for WordPress" version 4.4.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.4" instead of "8.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin27,059 lines of code in 267 files:
LanguageFilesBlank linesComment linesLines of code
PHP2504,90120,45524,429
Markdown836701,380
JSON100733
JavaScript64114482
CSS28035

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.62
▷ Minimum class complexity1.00
▷ Maximum class complexity107.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces24
Interfaces30
Traits8
Classes197
▷ Abstract classes42.03%
▷ Concrete classes19397.97%
▷ Final classes3518.13%
Methods1,862
▷ Static methods37219.98%
▷ Public methods1,56283.89%
▷ Protected methods1397.47%
▷ Private methods1618.65%
Functions207
▷ Named functions5727.54%
▷ Anonymous functions15072.46%
Constants556
▷ Global constants40.72%
▷ Class constants55299.28%
▷ Public constants54198.01%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/azure-icon.png51.83KB4.05KB▼ 92.18%
images/azure-subscription.png7.95KB5.22KB▼ 34.34%
images/Azure 2017.png58.99KB8.19KB▼ 86.11%