89% strip-image-metadata-for-jpg-and-webp

Code Review | Strip Image Metadata for JPG and WEBP

WordPress plugin Strip Image Metadata for JPG and WEBP scored89%from 54 tests.

About plugin

  • Plugin page: strip-image-metad...
  • Plugin version: 1.3.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 11, 2023
  • Latest release: Oct 21, 2023
  • Number of updates: 15
  • Update frequency: every 5.4 days
  • Top authors: martinvonberg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /103 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.39ms] Passed 4 tests

Analyzing server-side resources used by Strip Image Metadata for JPG and WEBP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.45 ▼3.14
Dashboard /wp-admin3.33 ▲0.0246.12 ▼0.93
Posts /wp-admin/edit.php3.38 ▲0.0247.33 ▼0.79
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.57 ▼16.71
Media Library /wp-admin/upload.php3.25 ▲0.0233.17 ▲1.11
Strip Image Metadata /wp-admin/options-general.php?page=wp_strip_image_metadata3.2131.25

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Strip Image Metadata for JPG and WEBP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.34 ▼0.261.62 ▼0.0438.47 ▼7.33
Dashboard /wp-admin2,213 ▲365.53 ▼0.0779.96 ▼19.4538.49 ▼5.58
Posts /wp-admin/edit.php2,119 ▲222.04 ▲0.0640.17 ▲6.6237.22 ▲1.51
Add New Post /wp-admin/post-new.php1,543 ▼521.01 ▲2.89664.11 ▲65.6356.83 ▼9.54
Media Library /wp-admin/upload.php1,415 ▲124.20 ▲0.0895.88 ▼3.2542.66 ▲1.78
Strip Image Metadata /wp-admin/options-general.php?page=wp_strip_image_metadata9621.8124.9332.71

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
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
5 plugin tags: strip, image, privacy, metadata, exif

strip-image-metadata-for-jpg-and-webp/strip-image-metadata.php 85% from 13 tests

The primary PHP file in "Strip Image Metadata for JPG and WEBP" version 1.3.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("strip-image-metadata-for-jpg-and-webp.php" instead of "strip-image-metadata.php")

Code Analysis Passed 3 tests

File types Passed 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
Everything looks great! No dangerous files found in this plugin1,357 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32454931,267
PO File1354590

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity122.00
▷ Minimum class complexity122.00
▷ Maximum class complexity122.00
Average method complexity5.47
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods21
▷ Static methods21100.00%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions25
▷ Named functions1768.00%
▷ Anonymous functions832.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.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
There are no PNG files in this plugin