74% 2checkout

Code Review | 2Checkout Integration for WordPress - WP Super Pay

WordPress plugin 2Checkout Integration for WordPress - WP Super Pay scored 74% from 54 tests.

About plugin

  • Plugin page: 2checkout
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7.1
  • WordPress version: 5.9.2
  • First release: Jun 3, 2021
  • Latest release: Jun 3, 2021
  • Number of updates: 3
  • Update frequency: every 15.0 days
  • Top authors: mukto90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 484 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.80MB] [CPU: ▼288.94ms] Passed 4 tests

This is a short check of server-side resources used by 2Checkout Integration for WordPress - WP Super Pay
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.28 ▲0.7762.52 ▲12.27
Dashboard /wp-admin4.37 ▲0.9640.04 ▲6.54
Posts /wp-admin/edit.php4.46 ▲0.8242.98 ▲7.95
Add New Post /wp-admin/post-new.php7.76 ▲0.79100.46 ▼1,172.47
Media Library /wp-admin/upload.php4.12 ▲0.8228.34 ▲2.21
Transactions /wp-admin/admin.php?page=2checkout-transactions4.1527.57
Settings /wp-admin/admin.php?page=2checkout-settings4.1231.67
Payment Forms /wp-admin/edit.php?post_type=twoco4.1629.80

Server storage [IO: ▲0.22MB] [DB: ▲0.16MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 60 new files
Database: 2 new tables, 5 new options
New tables
wp_2co_transactions
wp_2co_transactionmeta
New WordPress options
2checkout_install_time
codexpert-blog-json
_2checkout_notices
2checkout_version
2checkout_installed

Browser metrics Passed 4 tests

This is an overview of browser requirements for 2Checkout Integration for WordPress - WP Super Pay
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,265 ▲52121.87 ▲6.25310.66 ▲303.623.27 ▲1.32
Dashboard /wp-admin3,123 ▲2626.38 ▲0.21118.53 ▼16.47169.13 ▲7.20
Posts /wp-admin/edit.php2,749 ▲553.29 ▼0.0663.93 ▲0.95138.24 ▼5.14
Add New Post /wp-admin/post-new.php1,704 ▲4315.62 ▼1.13465.71 ▲67.93156.67 ▲7.67
Media Library /wp-admin/upload.php1,760 ▲655.65 ▲0.11126.20 ▼20.24185.83 ▼10.04
Transactions /wp-admin/admin.php?page=2checkout-transactions1,2562.7755.1097.89
Settings /wp-admin/admin.php?page=2checkout-settings1,4095.5373.97138.11
Payment Forms /wp-admin/edit.php?post_type=twoco1,4323.2161.84107.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_2co_transactions
    • wp_2co_transactionmeta
  • This plugin does not fully uninstall, leaving 5 options in the database
    • 2checkout_version
    • 2checkout_installed
    • _2checkout_notices
    • 2checkout_install_time
    • codexpert-blog-json

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/2checkout/functions/helpers.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/2checkout/functions/helpers.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/2checkout/views/payment-section.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/2checkout/functions/helpers.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/2checkout/views/payment-section.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/2checkout/functions/helpers.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/2checkout/functions/helpers.php on line 3
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/2checkout/views/payment-section.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/2checkout/views/transactions.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/2checkout/functions/helpers.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: twoco, 2checkout for wordpress, 2checkout

2checkout/2checkout.php 92% from 13 tests

The main file in "2Checkout Integration for WordPress - WP Super Pay" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin4,825 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
PHP358889123,495
CSS856971
JavaScript7234288
JSON30070
Markdown1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity24.43
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes23
▷ Abstract classes28.70%
▷ Concrete classes2191.30%
▷ Final classes14.76%
Methods229
▷ Static methods73.06%
▷ Public methods21995.63%
▷ Protected methods20.87%
▷ Private methods83.49%
Functions17
▷ Named functions1376.47%
▷ Anonymous functions423.53%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
vendor/codexpert/plugin/src/assets/img/survey.png7.31KB3.08KB▼ 57.88%