10% woo-paypal-inr-support

Code Review | Woocommerce Paypal INR

WordPress plugin Woocommerce Paypal INR scored10%from 54 tests.

About plugin

  • Plugin page: woo-paypal-inr-su...
  • Plugin version: 0.9
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9.6
  • WordPress version: 6.3.1
  • First release: Jul 10, 2018
  • Latest release: Jul 10, 2018
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: promz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /738 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-admin/admin.php+27
    Constant WP_BLOG_ADMIN already defined

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

This is a short check of server-side resources used by Woocommerce Paypal INR
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.58 ▼0.82
Dashboard /wp-admin3.31 ▼0.0441.89 ▼24.37
Posts /wp-admin/edit.php3.36 ▲0.0044.52 ▼1.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.21 ▼15.59
Media Library /wp-admin/upload.php3.23 ▲0.0034.14 ▲0.37

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Woocommerce Paypal INR: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.39 ▲0.001.95 ▲0.1841.47 ▼2.59
Dashboard /wp-admin2,206 ▲185.83 ▲0.9297.34 ▼13.7140.29 ▼6.28
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0039.83 ▲2.0036.07 ▲2.87
Add New Post /wp-admin/post-new.php1,536 ▲1423.26 ▼0.12639.12 ▼5.0853.88 ▲2.88
Media Library /wp-admin/upload.php1,391 ▼04.31 ▲0.1296.98 ▲0.1040.90 ▼3.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
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: Call to undefined function add_action() in wp-content/plugins/woo-paypal-inr-support/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-paypal-inr-support/admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: woocommerce, currency, payment, paypal, inr

woo-paypal-inr-support/init.php 92% from 13 tests

This is the main PHP file of "Woocommerce Paypal INR" version 0.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-paypal-inr-support.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin108 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2465108

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.35MB with 0.23MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Screenshot_3.png52.42KB19.67KB▼ 62.47%
Screenshot_2.png33.53KB12.74KB▼ 62.01%
Screenshot_1.png269.94KB73.72KB▼ 72.69%