78% scd-smart-currency-detector-premium-variant-for-wcvendor

Code Review | SCM - Smart Currency Manager - Premium Variant for WcVendor

WordPress plugin SCM - Smart Currency Manager - Premium Variant for WcVendor scored78%from 54 tests.

About plugin

  • Plugin page: scd-smart-currenc...
  • Plugin version: 4.8.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 10, 2022
  • Latest release: Sep 30, 2023
  • Number of updates: 5
  • Update frequency: every 72.8 days
  • Top authors: scd2021 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /244 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.64MB] [CPU: ▼2.76ms] Passed 4 tests

An overview of server-side resources used by SCM - Smart Currency Manager - Premium Variant for WcVendor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2739.40 ▼2.60
Dashboard /wp-admin4.06 ▲0.7653.76 ▼4.63
Posts /wp-admin/edit.php4.17 ▲0.8256.51 ▲2.04
Add New Post /wp-admin/post-new.php6.66 ▲0.7896.75 ▼5.86
Media Library /wp-admin/upload.php3.99 ▲0.7650.10 ▲15.09

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 100 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
scd_wcv_first_install_date
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

SCM - Smart Currency Manager - Premium Variant for WcVendor: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲11013.90 ▼0.4813.52 ▲11.5941.68 ▼2.13
Dashboard /wp-admin2,199 ▲285.57 ▼0.0186.29 ▼10.1344.47 ▼1.35
Posts /wp-admin/edit.php2,110 ▲102.02 ▲0.0739.89 ▲3.4042.77 ▲7.25
Add New Post /wp-admin/post-new.php1,603 ▲7522.42 ▼0.88682.14 ▲36.3339.98 ▼19.02
Media Library /wp-admin/upload.php1,407 ▲164.25 ▲0.09116.12 ▲11.0649.71 ▲6.38

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • scd_wcv_first_install_date
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/scd-smart-currency-detector-premium-variant-for-wcvendor/templates/scd_wcvendors_pro_product_variation.PHP
  • 27× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/scd-smart-currency-detector-premium-variant-for-wcvendor/templates/wcv-reports.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p6_DebugBar_Panel' not found in wp-content/plugins/scd-smart-currency-detector-premium-variant-for-wcvendor/plugin-update-checker/Puc/v4p6/DebugBar/ThemePanel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p6_Plugin_UpdateChecker' not found in wp-content/plugins/scd-smart-currency-detector-premium-variant-for-wcvendor/plugin-update-checker/Puc/v4p6/Vcs/PluginUpdateChecker.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p6_DebugBar_Extension' not found in wp-content/plugins/scd-smart-currency-detector-premium-variant-for-wcvendor/plugin-update-checker/Puc/v4p6/DebugBar/PluginExtension.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p6_Vcs_Api' not found in wp-content/plugins/scd-smart-currency-detector-premium-variant-for-wcvendor/plugin-update-checker/Puc/v4p6/Vcs/GitLabApi.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/scd-smart-currency-detector-premium-variant-for-wcvendor/scd_pro_currencies.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/scd-smart-currency-detector-premium-variant-for-wcvendor/scd_update_checker_wcv.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p6_Metadata' not found in wp-content/plugins/scd-smart-currency-detector-premium-variant-for-wcvendor/plugin-update-checker/Puc/v4p6/Plugin/Info.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p6_Metadata' not found in wp-content/plugins/scd-smart-currency-detector-premium-variant-for-wcvendor/plugin-update-checker/Puc/v4p6/Update.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/scd-smart-currency-detector-premium-variant-for-wcvendor/templates/scd_widget.php:6

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 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (General settings), #2 (Updates of rates), #3 (Vendor dashboard choose currency setting), #4 (WC Vendor Home vendor Dashboard), #5 (WC Vendor orders), #6 (Admin dashboard), #7 (Mobile widget), #8 (Shipping), #9 (Currency settings)
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

scd-smart-currency-detector-premium-variant-for-wcvendor/index.php 92% from 13 tests

The primary PHP file in "SCM - Smart Currency Manager - Premium Variant for WcVendor" version 4.8.0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("scd-smart-currency-detector-premium-variant-for-wcvendor.php" instead of "index.php")

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
No dangerous file extensions were detected8,334 lines of code in 74 files:
LanguageFilesBlank linesComment linesLines of code
PHP501,9112,4437,242
PO File137174415
JavaScript46128300
Markdown2880246
JSON48076
CSS114155

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity23.72
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes35
▷ Abstract classes514.29%
▷ Concrete classes3085.71%
▷ Final classes00.00%
Methods398
▷ Static methods246.03%
▷ Public methods23057.79%
▷ Protected methods15639.20%
▷ Private methods123.02%
Functions73
▷ Named functions6487.67%
▷ Anonymous functions912.33%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.45MB with 0.24MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/flags1.png380.75KB97.67KB▼ 74.35%
images/scd_remove.png2.04KB1.55KB▼ 24.26%
images/flags.png74.75KB25.52KB▼ 65.86%