77% mediamodifier-for-woocommerce

Code Review | PoD Plugin for WooCommerce - Mediamodifier

WordPress plugin PoD Plugin for WooCommerce - Mediamodifier scored77%from 54 tests.

About plugin

  • Plugin page: mediamodifier-for...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-5.8
  • WordPress version: 6.3.1
  • First release: Jan 7, 2022
  • Latest release: Jan 19, 2022
  • Number of updates: 7
  • Update frequency: every 1.9 days
  • Top authors: mediamodifier (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /454 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

Analyzing server-side resources used by PoD Plugin for WooCommerce - Mediamodifier
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.75 ▼0.32
Dashboard /wp-admin3.31 ▲0.0045.97 ▼5.35
Posts /wp-admin/edit.php3.36 ▲0.0047.65 ▼3.94
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.59 ▼10.03
Media Library /wp-admin/upload.php3.23 ▲0.0036.62 ▼1.13

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

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

Browser metrics Passed 4 tests

A check of browser resources used by PoD Plugin for WooCommerce - Mediamodifier
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.001.69 ▼0.3243.67 ▲1.55
Dashboard /wp-admin2,198 ▲185.58 ▲0.0187.18 ▼6.4941.80 ▲1.78
Posts /wp-admin/edit.php2,100 ▲32.01 ▲0.0635.43 ▼0.3136.45 ▼0.54
Add New Post /wp-admin/post-new.php1,531 ▲223.04 ▲0.03693.00 ▲86.0778.53 ▲17.74
Media Library /wp-admin/upload.php1,397 ▼34.23 ▲0.0497.14 ▼5.7743.36 ▲1.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mediamodifier-for-woocommerce/partials/pod-templates.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/mediamodifier-for-woocommerce/config/main.php:22
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mediamodifier-for-woocommerce/mediamodifier-pod-for-woocommerce.php on line 6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/mediamodifier-for-woocommerce/mediamodifier-pod-for-woocommerce.php on line 6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/mediamodifier-for-woocommerce/mediamodifier-pod-for-woocommerce.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/mediamodifier-for-woocommerce/partials/pod-main-settings.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (-) image missing
The official readme.txt might help

mediamodifier-for-woocommerce/mediamodifier-pod-for-woocommerce.php 77% from 13 tests

Analyzing the main PHP file in "PoD Plugin for WooCommerce - Mediamodifier" version 1.0
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("mediamodifier-for-woocommerce.php" instead of "mediamodifier-pod-for-woocommerce.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.1" instead of "2.6")

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
There were no executable files found in this plugin1,779 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP284572811,710
PO File1182252
CSS10014
JavaScript2002
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.86
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods125
▷ Static methods1915.20%
▷ Public methods11088.00%
▷ Protected methods00.00%
▷ Private methods1512.00%
Functions9
▷ Named functions111.11%
▷ Anonymous functions888.89%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants436.36%

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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/favicon-32x32.png0.60KB0.70KB0.00%