84% woocommerce-migs-gateway

Code Review | Woocommerce Migs

WordPress plugin Woocommerce Migs scored 84% from 54 tests.

About plugin

  • Plugin page: woocommerce-migs-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.8.1
  • WordPress version: 6.3.1
  • First release: Jun 4, 2015
  • Latest release: Dec 7, 2016
  • Number of updates: 13
  • Update frequency: every 63.1 days
  • Top authors: iwcontribution (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

40+ active / 2,308 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by Woocommerce Migs
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.92 ▼8.11
Dashboard /wp-admin3.31 ▲0.0144.80 ▼1.94
Posts /wp-admin/edit.php3.36 ▲0.0142.20 ▼1.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.29 ▼11.21
Media Library /wp-admin/upload.php3.23 ▲0.0132.04 ▼1.30

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woocommerce Migs
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.18 ▼1.061.99 ▼0.2544.24 ▼1.32
Dashboard /wp-admin2,206 ▲154.85 ▼0.0299.86 ▼4.8638.93 ▲1.46
Posts /wp-admin/edit.php2,089 ▲32.05 ▲0.0336.74 ▲1.7232.45 ▲3.35
Add New Post /wp-admin/post-new.php1,542 ▲2318.40 ▼4.75644.67 ▼41.6953.39 ▼3.14
Media Library /wp-admin/upload.php1,385 ▼64.24 ▼0.0699.67 ▼0.0542.21 ▼0.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woocommerce-migs-gateway/migs.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/woocommerce-migs-gateway/migs-gateway.php:13

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

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: migs payment gateway integration with woocommerce, visa mastercard plugin, mastercard internet gateway service, payment gateway, migs

woocommerce-migs-gateway/migs-gateway.php 92% from 13 tests

The principal PHP file in "Woocommerce Migs" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-migs-gateway.php" instead of "migs-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin333 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP37698333

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity30.00
▷ Minimum class complexity7.00
▷ Maximum class complexity53.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1487.50%
▷ Protected methods212.50%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin