79% rafa-azure-simple-upload

Code Review | Rafa Azure Simple Upload

WordPress plugin Rafa Azure Simple Upload scored79%from 54 tests.

About plugin

  • Plugin page: rafa-azure-simple...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.8.2
  • WordPress version: 6.3.1
  • First release: Dec 19, 2017
  • Latest release: Dec 19, 2017
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: rafacorre (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /562 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.47ms] Passed 4 tests

This is a short check of server-side resources used by Rafa Azure Simple Upload
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.08 ▼4.80
Dashboard /wp-admin3.39 ▲0.0549.67 ▼15.10
Posts /wp-admin/edit.php3.44 ▲0.0950.94 ▲0.77
Add New Post /wp-admin/post-new.php5.91 ▲0.0393.86 ▼14.74
Media Library /wp-admin/upload.php3.25 ▲0.0342.95 ▲5.22
Rafa Azure Simple Upload /wp-admin/options-general.php?page=rafa-azure-simple-upload-plugin-options3.9754.32

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Rafa Azure Simple Upload
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.72 ▲0.371.92 ▲0.1642.39 ▼0.30
Dashboard /wp-admin2,199 ▲215.56 ▼0.0990.24 ▼11.7441.50 ▼6.06
Posts /wp-admin/edit.php2,114 ▲142.02 ▲0.0035.09 ▼1.4636.71 ▲0.00
Add New Post /wp-admin/post-new.php1,537 ▲1123.15 ▼0.05664.57 ▼35.2755.00 ▲3.29
Media Library /wp-admin/upload.php1,413 ▲134.12 ▼0.07107.54 ▲0.6947.70 ▲2.77
Rafa Azure Simple Upload /wp-admin/options-general.php?page=rafa-azure-simple-upload-plugin-options8972.0322.3330.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=rafa-azure-simple-upload-plugin-options
    • > Deprecated in wp-content/plugins/rafa-azure-simple-upload/vendor/twig/twig/lib/Twig/Node.php+198
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

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
The following issues need your attention
  • 576× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_TemplateInterface' not found in wp-content/plugins/rafa-azure-simple-upload/vendor/twig/twig/lib/Twig/Template.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/rafa-azure-simple-upload/vendor/microsoft/azure-storage/tests/Unit/Blob/Models/CreateBlobOptionsTest.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'MicrosoftAzure\\Storage\\Tests\\Functional\\Table\\IntegrationTestBase' not found in wp-content/plugins/rafa-azure-simple-upload/vendor/microsoft/azure-storage/tests/Functional/Table/TableServiceIntegrationTest.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/rafa-azure-simple-upload/vendor/twig/twig/test/Twig/Tests/LexerTest.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Extension' not found in wp-content/plugins/rafa-azure-simple-upload/vendor/twig/extensions/lib/Twig/Extensions/Extension/Text.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/rafa-azure-simple-upload/vendor/guzzlehttp/psr7/src/NoSeekStream.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/rafa-azure-simple-upload/vendor/twig/twig/test/Twig/Tests/Cache/FilesystemTest.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_CacheInterface' not found in wp-content/plugins/rafa-azure-simple-upload/vendor/twig/twig/lib/Twig/Cache/Null.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/rafa-azure-simple-upload/vendor/microsoft/azure-storage/tests/Unit/Blob/Models/LeaseResultTest.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'MicrosoftAzure\\Storage\\Tests\\Functional\\File\\IntegrationTestBase' not found in wp-content/plugins/rafa-azure-simple-upload/vendor/microsoft/azure-storage/tests/Functional/File/FunctionalTestBase.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: wordpress upload, upload, azure, microsoft upload azure

rafa-azure-simple-upload/rafa-azure-simple-upload.php Passed 13 tests

The principal PHP file in "Rafa Azure Simple Upload" v. 1.1.1 is loaded by WordPress automatically on each request
57 characters long description:
Use the Windows Azure to host your website's media files.

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
There were no executable files found in this plugin86,924 lines of code in 1,135 files:
LanguageFilesBlank linesComment linesLines of code
PHP97915,98047,73377,216
Markdown141,07503,641
reStructuredText962,5822,2493,608
C1172184859
JSON900795
Ant14520274
XML8290174
PO File25252147
HTML1270104
YAML216163
C/C++ Header171315
Twig86014
make1409
m41215

PHP code Passed 2 tests

Analyzing 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.19
Average class complexity6.13
▷ Minimum class complexity1.00
▷ Maximum class complexity360.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces85
Interfaces67
Traits7
Classes928
▷ Abstract classes202.16%
▷ Concrete classes90897.84%
▷ Final classes121.32%
Methods5,551
▷ Static methods59510.72%
▷ Public methods4,78486.18%
▷ Protected methods3766.77%
▷ Private methods3917.04%
Functions439
▷ Named functions22250.57%
▷ Anonymous functions21749.43%
Constants706
▷ Global constants60.85%
▷ Class constants70099.15%
▷ Public constants700100.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