90% wp-image-mask

Code Review | WP Image Mask

WordPress plugin WP Image Mask scored90%from 54 tests.

About plugin

  • Plugin page: wp-image-mask
  • Plugin version: 3.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 7, 2020
  • Latest release: Jul 18, 2023
  • Number of updates: 12
  • Update frequency: every 79.7 days
  • Top authors: barb0ss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,062 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.03MB] [CPU: ▼3.97ms] Passed 4 tests

An overview of server-side resources used by WP Image Mask
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.28 ▼3.59
Dashboard /wp-admin3.34 ▲0.0346.20 ▼4.50
Posts /wp-admin/edit.php3.39 ▲0.0345.40 ▼3.13
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.60 ▼4.64
Media Library /wp-admin/upload.php3.26 ▲0.0334.65 ▼1.17

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Image Mask
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.58 ▼0.961.48 ▼0.3440.94 ▼2.66
Dashboard /wp-admin2,206 ▲244.85 ▼0.96102.45 ▼2.9339.72 ▼4.50
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0741.50 ▲6.9236.15 ▼1.40
Add New Post /wp-admin/post-new.php6,186 ▲4,65319.22 ▼4.16916.65 ▲236.5254.31 ▼0.72
Media Library /wp-admin/upload.php1,382 ▼94.21 ▼0.0297.93 ▼2.1241.79 ▼2.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: mask, shortcode, gutenberg, image

wp-image-mask/wp-image-mask.php Passed 13 tests

This is the main PHP file of "WP Image Mask" version 3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
38 characters long description:
Add the ability to set a mask to image

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin561 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
SVG614190
PHP43775136
JSON20090
JavaScript184953
PO File1151848
CSS2122344

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected