10% media2commerce

Code Review | Media2Commerce

WordPress plugin Media2Commerce scored10%from 54 tests.

About plugin

  • Plugin page: media2commerce
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.6
  • WordPress version: 6.3.1
  • First release: Jul 16, 2013
  • Latest release: Aug 21, 2013
  • Number of updates: 7
  • Update frequency: every 5.3 days
  • Top authors: 8MediaCentral (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,110 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/media2commerce/php/m2c-settings.php+28
    include_once(premium-settings.php): failed to open stream: No such file or directory

Server metrics [RAM: ▼1.96MB] [CPU: ▼55.12ms] Passed 4 tests

Server-side resources used by Media2Commerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.443.95 ▼38.42
Dashboard /wp-admin2.05 ▼1.265.43 ▼47.03
Posts /wp-admin/edit.php2.05 ▼1.316.37 ▼39.69
Add New Post /wp-admin/post-new.php2.05 ▼3.846.51 ▼95.35
Media Library /wp-admin/upload.php2.05 ▼1.186.22 ▼24.37
Media2Commerce Settings /wp-admin/options-general.php?page=m2c_display2.055.11

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Media2Commerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲3914.25 ▲0.081.87 ▼1.6442.55 ▲2.26
Dashboard /wp-admin2,206 ▲325.58 ▲0.0182.20 ▼14.9045.64 ▲7.10
Posts /wp-admin/edit.php2,112 ▲152.01 ▲0.0235.57 ▲0.0633.24 ▼2.08
Add New Post /wp-admin/post-new.php1,536 ▲823.12 ▼0.04688.99 ▲33.3460.60 ▼3.70
Media Library /wp-admin/upload.php1,411 ▲84.17 ▼0.02106.11 ▲3.8047.68 ▲2.84
Media2Commerce Settings /wp-admin/options-general.php?page=m2c_display9872.0637.4639.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/media2commerce/php/m2c-settings.php+28
    include_once(premium-settings.php): failed to open stream: No such file or directory
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • eightmcPlugin_m2c_default_types
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=m2c_display
    • > Warning in wp-content/plugins/media2commerce/php/m2c-settings.php+28
    include_once(premium-settings.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/options-general.php?page=m2c_display
    • > Warning in wp-content/plugins/media2commerce/php/m2c-settings.php+28
    include_once(): Failed opening 'premium-settings.php' for inclusion (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/options-general.php?page=m2c_display
    • > Warning in wp-content/plugins/media2commerce/php/m2c-settings.php+361
    A non-numeric value encountered

SRP 0% 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/media2commerce/index.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/media2commerce/php/m2c-settings.php:66

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

media2commerce/media2commerce.php Passed 13 tests

"Media2Commerce" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
60 characters long description:
Automatically creates WooCommerce products from media images

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
There were no executable files found in this plugin837 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3291303724
CSS124684
JavaScript17929

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity60.00
▷ Minimum class complexity46.00
▷ Maximum class complexity74.00
Average method complexity4.19
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin