90% wp-strip-image-metadata

Code Review | WP Strip Image Metadata

WordPress plugin WP Strip Image Metadata scored 90% from 54 tests.

About plugin

  • Plugin page: wp-strip-image-me...
  • Plugin version: 1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.0
  • WordPress version: 6.3.1
  • First release: Jun 12, 2022
  • Latest release: Jun 13, 2022
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: samiff (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active / 1,253 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.09MB] [CPU: ▼4.89ms] Passed 4 tests

Analyzing server-side resources used by WP Strip Image Metadata
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.01 ▼3.00
Dashboard /wp-admin3.40 ▲0.0947.88 ▼0.17
Posts /wp-admin/edit.php3.51 ▲0.1552.87 ▲4.07
Add New Post /wp-admin/post-new.php5.98 ▲0.0986.78 ▼16.19
Media Library /wp-admin/upload.php3.32 ▲0.0936.34 ▼0.19
Strip Image Metadata /wp-admin/options-general.php?page=wp_strip_image_metadata3.2832.28

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WP Strip Image Metadata
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.35 ▼1.264.14 ▲2.3240.61 ▼8.89
Dashboard /wp-admin2,216 ▲284.85 ▼1.00109.40 ▲6.9341.97 ▲0.30
Posts /wp-admin/edit.php2,099 ▲102.00 ▲0.0239.72 ▲0.5939.24 ▼0.01
Add New Post /wp-admin/post-new.php1,544 ▲1123.43 ▲0.19634.58 ▲7.8764.16 ▲3.05
Media Library /wp-admin/upload.php1,401 ▲104.22 ▼0.0195.23 ▼5.9945.14 ▲1.96
Strip Image Metadata /wp-admin/options-general.php?page=wp_strip_image_metadata8782.0725.0229.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output 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 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
5 plugin tags: exif, image, metadata, privacy, strip

wp-strip-image-metadata/wp-strip-image-metadata.php Passed 13 tests

The main PHP script in "WP Strip Image Metadata" version 1.0 is automatically included on every request by WordPress
76 characters long description:
Strip image metadata on upload or via bulk action, and view image EXIF data.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin462 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP195206462

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity65.00
▷ Minimum class complexity65.00
▷ Maximum class complexity65.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods19100.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin