84% wp-offload-s3-filter-image-file-types

Code Review | Block Uploading Images for WP Offload Media

WordPress plugin Block Uploading Images for WP Offload Media scored84%from 54 tests.

About plugin

  • Plugin page: wp-offload-s3-fil...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.1
  • WordPress version: 6.3.1
  • First release: Jul 16, 2015
  • Latest release: Mar 5, 2019
  • Number of updates: 8
  • Update frequency: every 166.0 days
  • Top authors: sebd86 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,125 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.49ms] Passed 4 tests

An overview of server-side resources used by Block Uploading Images for WP Offload Media
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0134.56 ▼9.41
Dashboard /wp-admin3.31 ▲0.0047.71 ▼4.71
Posts /wp-admin/edit.php3.36 ▲0.0050.53 ▲4.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.49 ▲6.71
Media Library /wp-admin/upload.php3.23 ▲0.0035.58 ▼0.06

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Block Uploading Images for WP Offload Media
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.174.41 ▲2.3838.42 ▼5.56
Dashboard /wp-admin2,209 ▲215.85 ▲0.98109.63 ▼7.1740.71 ▼5.73
Posts /wp-admin/edit.php2,089 ▲32.02 ▼0.0240.74 ▲2.5335.23 ▼2.80
Add New Post /wp-admin/post-new.php1,514 ▼1917.70 ▼5.40687.38 ▼15.1661.92 ▲8.15
Media Library /wp-admin/upload.php1,388 ▼34.30 ▲0.0497.38 ▼5.7341.88 ▼0.45

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-offload-s3-filter-image-file-types/wp-offload-s3-filter-image-file-types.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can look at the official readme.txt

wp-offload-s3-filter-image-file-types/wp-offload-s3-filter-image-file-types.php Passed 13 tests

The entry point to "Block Uploading Images for WP Offload Media" version 1.0.1 is a PHP file that has certain tags in its header comment area
75 characters long description:
Stops images from uploading directly to your choice of CDN storage service.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected2,208 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JSON1002,185
PHP182223

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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