67% ua-marketplace

Code Review | Ua Marketplace

WordPress plugin Ua Marketplace scored67%from 54 tests.

About plugin

  • Plugin page: ua-marketplace
  • Plugin version: 1.4.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.0
  • WordPress version: 6.3.1
  • First release: Jan 28, 2020
  • Latest release: Sep 24, 2022
  • Number of updates: 56
  • Update frequency: every 17.4 days
  • Top authors: bandido (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /2,920 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.71MB] [CPU: ▲34.00ms] 75% from 4 tests

Analyzing server-side resources used by Ua Marketplace
It is recommended to improve the following
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.71MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.71 ▲6.2481.05 ▲39.91
Dashboard /wp-admin9.73 ▲6.3887.61 ▲24.80
Posts /wp-admin/edit.php9.73 ▲6.37100.02 ▲47.39
Add New Post /wp-admin/post-new.php9.73 ▲3.84125.52 ▲23.91
Media Library /wp-admin/upload.php9.73 ▲6.5085.40 ▲49.62
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius9.7377.83

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 236 new files
Database: no new tables, 12 new options
New WordPress options
fs_accounts
widget_theysaidso_widget
fs_debug_mode
fs_gdpr
theysaidso_admin_options
widget_recent-comments
mrkv_uamrkpl_collation_option
widget_recent-posts
can_compress_scripts
db_upgraded
...

Browser metrics Passed 4 tests

Checking browser requirements for Ua Marketplace
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲13414.35 ▲0.061.63 ▼0.1330.44 ▼15.12
Dashboard /wp-admin2,319 ▲1395.85 ▲0.2894.22 ▼5.7044.96 ▲2.11
Posts /wp-admin/edit.php2,219 ▲1192.39 ▲0.3842.88 ▲2.4839.25 ▲2.03
Add New Post /wp-admin/post-new.php1,567 ▲3122.25 ▲4.01667.38 ▲47.1436.18 ▼36.13
Media Library /wp-admin/upload.php1,519 ▲1224.38 ▲0.1488.30 ▼11.1742.89 ▼1.38
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,1402.2227.4126.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/ua-marketplace/uninstall.php+42
    chmod(): Operation not permitted
  • Zombie WordPress options detected upon uninstall: 10 options
    • fs_active_plugins
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • fs_debug_mode
    • widget_recent-comments
    • fs_accounts
    • fs_gdpr

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ua-marketplace/templates/dashboard-footer.php
  • 36× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Core\\WCShopController' not found in wp-content/plugins/ua-marketplace/inc/Core/WCShop/WCShopOffer.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Base\\BaseController' not found in wp-content/plugins/ua-marketplace/inc/Api/Callbacks/AdminCallbacks.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ua-marketplace/templates/dashboard-header.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Base\\BaseController' not found in wp-content/plugins/ua-marketplace/inc/Base/SupportController.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Base\\BaseController' not found in wp-content/plugins/ua-marketplace/inc/Base/RozetkaSettingsController.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Core\\Marketplaces\\APIs\\AbstractAPI' not found in wp-content/plugins/ua-marketplace/inc/Core/Marketplaces/APIs/RozetkaAPI.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Core\\WCShop\\WCShopOffer' not found in wp-content/plugins/ua-marketplace/inc/Core/WCShop/WCShopOfferVariable.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Core\\WCShop\\WCShopPromua\\WCShopPromuaOffer' not found in wp-content/plugins/ua-marketplace/inc/Core/WCShop/WCShopPromua/WCShopPromuaOfferVariable.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Core\\WCShopController' not found in wp-content/plugins/ua-marketplace/inc/Core/WCShop/WCShopCollation.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\Base\\BaseController' not found in wp-content/plugins/ua-marketplace/inc/Api/Callbacks/DashboardCallbacks.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: woocommerce, xml, ecommerce, rozetka

ua-marketplace/morkvawrs-plugin.php 77% from 13 tests

The main PHP script in "Ua Marketplace" version 1.4.4 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "3.8")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ua-marketplace.php" instead of "morkvawrs-plugin.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin35,591 lines of code in 191 files:
LanguageFilesBlank linesComment linesLines of code
PHP1718,49216,90135,134
Markdown2680215
JavaScript43459195
JSON20032
CSS120015

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity49.84
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces14
Interfaces0
Traits0
Classes94
▷ Abstract classes44.26%
▷ Concrete classes9095.74%
▷ Final classes11.11%
Methods1,426
▷ Static methods19913.96%
▷ Public methods1,06474.61%
▷ Protected methods151.05%
▷ Private methods34724.33%
Functions105
▷ Named functions9893.33%
▷ Anonymous functions76.67%
Constants125
▷ Global constants9878.40%
▷ Class constants2721.60%
▷ Public constants27100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%