73% dfoxm-mugglepay-for-woocommerce

Code Review | DFOXM MugglePay For WooCommerce

WordPress plugin DFOXM MugglePay For WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: dfoxm-mugglepay-f...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.7.6
  • WordPress version: 6.3.1
  • First release: Dec 29, 2020
  • Latest release: Jul 22, 2021
  • Number of updates: 17
  • Update frequency: every 12.4 days
  • Top authors: hoythan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /610 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼11.81ms] Passed 4 tests

An overview of server-side resources used by DFOXM MugglePay For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.05 ▼6.86
Dashboard /wp-admin3.33 ▼0.0248.44 ▼18.02
Posts /wp-admin/edit.php3.38 ▲0.0246.96 ▼9.24
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.67 ▼13.10
Media Library /wp-admin/upload.php3.25 ▲0.0238.38 ▲5.28

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 1,165 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

DFOXM MugglePay For WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.35 ▼0.181.82 ▲0.0438.38 ▼3.73
Dashboard /wp-admin2,192 ▲125.53 ▼0.1489.91 ▼2.5437.77 ▼3.46
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0437.91 ▼5.8934.71 ▼4.78
Add New Post /wp-admin/post-new.php1,526 ▼023.24 ▼0.41623.84 ▼59.2251.81 ▼6.80
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.0297.35 ▼12.3846.91 ▲0.46

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 469× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Helper\\Helper' not found in wp-content/plugins/dfoxm-mugglepay-for-woocommerce/tools/php-cs-fixer/vendor/symfony/console/Helper/ProcessHelper.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'PhpCsFixer\\AbstractFixer' not found in wp-content/plugins/dfoxm-mugglepay-for-woocommerce/tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/src/Fixer/Strict/DeclareStrictTypesFixer.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'PhpCsFixer\\AbstractFixer' not found in wp-content/plugins/dfoxm-mugglepay-for-woocommerce/tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/src/Fixer/StringNotation/SingleQuoteFixer.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PhpCsFixer\\AbstractFixer' not found in wp-content/plugins/dfoxm-mugglepay-for-woocommerce/tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/src/Fixer/LanguageConstruct/FunctionToConstantFixer.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'PhpCsFixer\\AbstractFixer' not found in wp-content/plugins/dfoxm-mugglepay-for-woocommerce/tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/NoUnusedImportsFixer.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\String\\AbstractUnicodeString' not found in wp-content/plugins/dfoxm-mugglepay-for-woocommerce/tools/php-cs-fixer/vendor/symfony/string/CodePointString.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'PhpCsFixer\\AbstractFixer' not found in wp-content/plugins/dfoxm-mugglepay-for-woocommerce/tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/src/Fixer/Operator/StandardizeNotEqualsFixer.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'PhpCsFixer\\AbstractFixer' not found in wp-content/plugins/dfoxm-mugglepay-for-woocommerce/tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/src/Fixer/Naming/NoHomoglyphNamesFixer.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpCsFixer\\Differ\\DifferInterface' not found in wp-content/plugins/dfoxm-mugglepay-for-woocommerce/tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/src/Differ/NullDiffer.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpCsFixer\\Console\\Output\\ProcessOutputInterface' not found in wp-content/plugins/dfoxm-mugglepay-for-woocommerce/tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/src/Console/Output/NullOutput.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention: You can look at the official readme.txt

dfoxm-mugglepay-for-woocommerce/muggle-pay-for-wp.php 85% from 13 tests

The principal PHP file in "DFOXM MugglePay For WooCommerce" v. 1.0.5 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dfoxm-mugglepay-for-woocommerce.php" instead of "muggle-pay-for-wp.php")
  • 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

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Please fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .exe - Executable in Windows
      • wp-content/plugins/dfoxm-mugglepay-for-woocommerce/tools/php-cs-fixer/vendor/symfony/console/Resources/bin/hiddeninput.exe
91,860 lines of code in 1,062 files:
LanguageFilesBlank linesComment linesLines of code
PHP74215,81430,02976,998
reStructuredText2304,2375,3985,900
Markdown4695004,851
JSON31003,293
YAML7633281
PO File184101205
XSD32931202
XML11912123
Bourne Shell1107

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity14.15
▷ Minimum class complexity1.00
▷ Maximum class complexity187.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces123
Interfaces81
Traits8
Classes629
▷ Abstract classes375.88%
▷ Concrete classes59294.12%
▷ Final classes40568.41%
Methods4,327
▷ Static methods3006.93%
▷ Public methods3,00669.47%
▷ Protected methods46110.65%
▷ Private methods86019.88%
Functions313
▷ Named functions9730.99%
▷ Anonymous functions21669.01%
Constants370
▷ Global constants184.86%
▷ Class constants35295.14%
▷ Public constants32191.19%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.13MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/mpay-en-black.png30.41KB6.42KB▼ 78.89%
assets/images/mpay-en.png28.77KB4.77KB▼ 83.43%
assets/images/mpay-zh.png31.16KB6.25KB▼ 79.93%
assets/images/mpay-icon.png24.24KB3.11KB▼ 87.16%
tools/php-cs-fixer/vendor/friendsofphp/php-cs-fixer/logo.png18.19KB7.18KB▼ 60.51%