84% dx-webp-picture-tag-image-wrapper

Code Review | DX Webp Picture Tag Image Wrapper

WordPress plugin DX Webp Picture Tag Image Wrapper scored84%from 54 tests.

About plugin

  • Plugin page: dx-webp-picture-t...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.8.2
  • WordPress version: 6.3.1
  • First release: Jan 19, 2022
  • Latest release: Jan 19, 2022
  • Number of updates: 6
  • Update frequency: every 7.0 days
  • Top authors: devrix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /752 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by DX Webp Picture Tag Image Wrapper
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.31 ▲2.59
Dashboard /wp-admin3.31 ▼0.0353.59 ▼16.21
Posts /wp-admin/edit.php3.36 ▲0.0154.23 ▼1.48
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.85 ▼29.22
Media Library /wp-admin/upload.php3.24 ▲0.0143.15 ▲3.24

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

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

Browser metrics Passed 4 tests

DX Webp Picture Tag Image Wrapper: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.75 ▲0.091.75 ▲0.1744.15 ▲5.25
Dashboard /wp-admin2,195 ▲215.65 ▼0.0098.23 ▲1.7343.36 ▲0.58
Posts /wp-admin/edit.php2,097 ▼31.96 ▼0.0438.64 ▼2.5834.77 ▼2.30
Add New Post /wp-admin/post-new.php1,526 ▼922.90 ▲4.82686.68 ▲70.4255.07 ▼11.64
Media Library /wp-admin/upload.php1,403 ▲34.21 ▼0.07112.52 ▲4.3446.30 ▼1.68

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please take a closer look at the following
  • 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/dx-webp-picture-tag-image-wrapper/dx-picture-tag.php:48

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 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: picture, img, post, webp, media

dx-webp-picture-tag-image-wrapper/dx-picture-tag.php 85% from 13 tests

This is the main PHP file of "DX Webp Picture Tag Image Wrapper" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: The principal plugin file should be the same as the plugin slug ("dx-webp-picture-tag-image-wrapper.php" instead of "dx-picture-tag.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 plugin24 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1111324

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.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 images were found in this plugin