83% directpay-ipg-woocommerce

Code Review | DirectPay-IPG WooCommerce

WordPress plugin DirectPay-IPG WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: directpay-ipg-woo...
  • Plugin version: 2.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2019
  • Latest release: Apr 20, 2021
  • Number of updates: 52
  • Update frequency: every 17.9 days
  • Top authors: paymedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /6,662 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.51ms] Passed 4 tests

Analyzing server-side resources used by DirectPay-IPG WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.58 ▲0.39
Dashboard /wp-admin3.37 ▲0.0252.40 ▼18.48
Posts /wp-admin/edit.php3.42 ▲0.0650.30 ▲0.22
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.06 ▼20.18
Media Library /wp-admin/upload.php3.29 ▲0.0639.10 ▲2.80

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

DirectPay-IPG WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.19 ▼0.211.91 ▲0.0943.82 ▼1.41
Dashboard /wp-admin2,192 ▲155.56 ▼0.1284.93 ▼4.6537.77 ▲1.99
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0335.14 ▼7.9734.78 ▼3.61
Add New Post /wp-admin/post-new.php1,550 ▼423.19 ▲4.97681.85 ▲53.3858.82 ▲10.63
Media Library /wp-admin/upload.php1,397 ▼34.21 ▲0.03103.07 ▼5.8147.09 ▲0.97

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/directpay-ipg-woocommerce/index.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === directpay-ipg-woocommerce === )
  • Screenshots: Screenshot #3 (Settings) image missing
The official readme.txt is a good inspiration

directpay-ipg-woocommerce/index.php 92% from 13 tests

The main file in "DirectPay-IPG WooCommerce" v. 2.0.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("directpay-ipg-woocommerce.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin327 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16370327

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo_.png13.37KB4.96KB▼ 62.94%