10% multi-vendor-campaign

Code Review | Multi Vendor Campaign

WordPress plugin Multi Vendor Campaign scored10%from 54 tests.

About plugin

  • Plugin page: multi-vendor-camp...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 5, 2022
  • Latest release: Jul 8, 2022
  • Number of updates: 3
  • Update frequency: every 6.0 days
  • Top authors: radostudiocom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /438 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Parse error in wp-content/plugins/multi-vendor-campaign/admin/class-multi-vendor-campaign-admin.php+705
    syntax error, unexpected 'public' (T_PUBLIC)

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

A check of server-side resources used by Multi Vendor Campaign
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.39 ▲0.78
Dashboard /wp-admin3.31 ▲0.0046.39 ▼2.61
Posts /wp-admin/edit.php3.36 ▲0.0046.22 ▲0.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.02 ▼4.56
Media Library /wp-admin/upload.php3.23 ▲0.0032.24 ▼1.58

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Multi Vendor Campaign
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.74 ▲0.121.86 ▲0.1743.24 ▲0.22
Dashboard /wp-admin2,206 ▲184.85 ▼1.03111.43 ▲8.8743.09 ▲2.09
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0534.25 ▼6.4331.33 ▼8.04
Add New Post /wp-admin/post-new.php1,537 ▼522.96 ▼0.21663.14 ▼33.9154.17 ▼5.36
Media Library /wp-admin/upload.php1,388 ▼34.23 ▼0.0092.00 ▼6.7043.35 ▼2.62

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Parse error
      syntax error, unexpected 'public' (T_PUBLIC) in wp-content/plugins/multi-vendor-campaign/admin/class-multi-vendor-campaign-admin.php on line 705
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/multi-vendor-campaign/admin/tables/campaign-product-list.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/multi-vendor-campaign/admin/tables/campaign-list.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/multi-vendor-campaign/admin/tables/campaign-order-list.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/multi-vendor-campaign/admin/tables/campaign-product-list.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/multi-vendor-campaign/admin/tables/campaign-products-list.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/multi-vendor-campaign/admin/tables/campaign-order-list.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/multi-vendor-campaign/public/class-multi-vendor-campaign-filter-widget.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/multi-vendor-campaign/admin/tables/campaign-products-list.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/multi-vendor-campaign/admin/tables/campaign-list.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

multi-vendor-campaign/multi-vendor-campaign.php 92% from 13 tests

The entry point to "Multi Vendor Campaign" version 1.0.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin3,991 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP179021,3113,122
CSS51084630
JavaScript4600239

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity31.07
▷ Minimum class complexity1.00
▷ Maximum class complexity162.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods154
▷ Static methods95.84%
▷ Public methods13889.61%
▷ Protected methods00.00%
▷ Private methods1610.39%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/icon.png1.37KB0.76KB▼ 44.43%
assets/admin/images/upload.png12.95KB6.85KB▼ 47.08%
assets/admin/images/vc-icon.png5.05KB2.96KB▼ 41.50%