84% oceanpayment-creditcard-gateway

Code Review | Oceanpayment CreditCard Gateway

WordPress plugin Oceanpayment CreditCard Gateway scored 84% from 54 tests.

About plugin

  • Plugin page: oceanpayment-cred...
  • Plugin version: 6.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Nov 15, 2022
  • Latest release: May 25, 2023
  • Number of updates: 32
  • Update frequency: every 9.9 days
  • Top authors: oceanpayment (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 781 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.41ms] Passed 4 tests

A check of server-side resources used by Oceanpayment CreditCard Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.96 ▲0.94
Dashboard /wp-admin3.31 ▲0.0046.26 ▼1.18
Posts /wp-admin/edit.php3.36 ▲0.0049.49 ▲4.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.64 ▼15.87
Media Library /wp-admin/upload.php3.23 ▲0.0034.16 ▼1.51

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Oceanpayment CreditCard Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.27 ▼1.401.77 ▼0.0344.04 ▼0.97
Dashboard /wp-admin2,209 ▲244.85 ▼0.2498.08 ▼2.2140.11 ▼4.67
Posts /wp-admin/edit.php2,086 ▼61.96 ▼0.0640.40 ▲0.0933.59 ▼2.26
Add New Post /wp-admin/post-new.php1,514 ▼1417.65 ▼0.60689.47 ▲90.0850.70 ▼5.27
Media Library /wp-admin/upload.php1,391 ▲34.22 ▼0.0096.67 ▼1.4940.81 ▼1.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/oceanpayment-creditcard-gateway/oceancreditcard.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
1 plugin tags: payment

oceanpayment-creditcard-gateway/oceancreditcard.php 92% from 13 tests

"Oceanpayment CreditCard Gateway" version 6.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("oceanpayment-creditcard-gateway.php" instead of "oceancreditcard.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin615 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2155202615

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity85.00
▷ Minimum class complexity85.00
▷ Maximum class complexity85.00
Average method complexity5.20
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
9 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/Electron.png17.13KB6.48KB▼ 62.17%
images/Mastercard.png5.45KB2.81KB▼ 48.49%
images/Discover.png6.98KB3.32KB▼ 52.44%
images/UnionPay.png25.43KB10.26KB▼ 59.64%
images/Maestro.png7.21KB3.84KB▼ 46.74%