78% s3-secure-url

Code Review | S3 Secure URL

WordPress plugin S3 Secure URL scored78%from 54 tests.

About plugin

  • Plugin page: s3-secure-url
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.2
  • WordPress version: 6.3.1
  • First release: Jul 3, 2015
  • Latest release: Jul 3, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: maxkostinevich (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,827 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
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.80ms] Passed 4 tests

Server-side resources used by S3 Secure URL
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0534.47 ▼5.37
Dashboard /wp-admin3.40 ▲0.0943.37 ▼2.74
Posts /wp-admin/edit.php3.51 ▲0.1545.54 ▲1.00
Add New Post /wp-admin/post-new.php5.98 ▲0.0981.33 ▼11.51
Media Library /wp-admin/upload.php3.32 ▲0.0931.88 ▼3.59
S3 Secure URL /wp-admin/options-general.php?page=s3-secure-url3.2931.98

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 37 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
s3_secure_url_plugin_version
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for S3 Secure URL
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲9713.36 ▼0.937.60 ▲5.4939.08 ▼6.43
Dashboard /wp-admin2,203 ▲265.54 ▼0.0386.87 ▼5.7338.98 ▼5.54
Posts /wp-admin/edit.php2,111 ▲111.96 ▼0.0637.14 ▲2.4136.59 ▼0.02
Add New Post /wp-admin/post-new.php1,538 ▲223.15 ▲4.86668.65 ▲45.7651.38 ▼10.16
Media Library /wp-admin/upload.php1,411 ▲174.17 ▼0.0294.27 ▼0.5343.19 ▲2.37
S3 Secure URL /wp-admin/options-general.php?page=s3-secure-url9522.0122.3632.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • s3_secure_url_plugin_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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 items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/s3-secure-url/admin/assets/js/tinymce-plugin/tinymce-plugin-popup.php
    • > /wp-content/plugins/s3-secure-url/admin/views/admin.php
    • > /wp-content/plugins/s3-secure-url/admin/views/_sidebar-right.php
    • > /wp-content/plugins/s3-secure-url/public/views/public.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/s3-secure-url/public/class-s3-secure-url.php:460

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Plugin settings page), #2 (Shortcode builder popup form)
The official readme.txt is a good inspiration

s3-secure-url/s3-secure-url.php 92% from 13 tests

The main PHP script in "S3 Secure URL" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,986 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP104741,2811,935
JavaScript3182838
CSS21713

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity79.00
▷ Minimum class complexity1.00
▷ Maximum class complexity268.00
Average method complexity5.24
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods92
▷ Static methods5863.04%
▷ Public methods7480.43%
▷ Protected methods00.00%
▷ Private methods1819.57%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.26MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png131.78KB56.46KB▼ 57.15%
admin/assets/js/tinymce-plugin/tinymce-plugin-btn.png1.05KB0.20KB▼ 81.17%
assets/banner-772x250.png8.25KB3.32KB▼ 59.81%
assets/banner-1544x500.png18.60KB7.86KB▼ 57.75%
assets/screenshot-1.png50.43KB23.09KB▼ 54.22%