83% maakapay-checkout-for-woocommerce

Code Review | Maakapay Checkout For Woocommerce

WordPress plugin Maakapay Checkout For Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: maakapay-checkout...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Jun 21, 2022
  • Latest release: Jun 21, 2022
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: maakapay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /198 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Maakapay Checkout For Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.19 ▼0.88
Dashboard /wp-admin3.31 ▲0.0047.31 ▼5.23
Posts /wp-admin/edit.php3.36 ▲0.0049.05 ▼1.40
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.45 ▼6.73
Media Library /wp-admin/upload.php3.23 ▲0.0037.07 ▼0.70

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Maakapay Checkout For Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.34 ▲0.062.05 ▼0.3046.51 ▲0.56
Dashboard /wp-admin2,192 ▲185.63 ▼0.0283.77 ▼12.3845.65 ▲6.86
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0636.54 ▼5.2732.97 ▼2.13
Add New Post /wp-admin/post-new.php1,526 ▼223.24 ▲0.05673.89 ▼37.0261.17 ▲5.47
Media Library /wp-admin/upload.php1,403 ▲34.22 ▼0.03100.48 ▼14.3647.49 ▼2.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/maakapay-checkout-for-woocommerce/admin/partials/maakapay-for-woocommerce-checkout-admin-transaction-detail.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/maakapay-checkout-for-woocommerce/public/partials/maakapay-for-woocommerce-checkout-public-payment-cancel.php:15
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/maakapay-checkout-for-woocommerce/admin/partials/maakapay-for-woocommerce-checkout-admin-display.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/maakapay-checkout-for-woocommerce/includes/class-maakapay-for-woocommerce-checkout-payment-gateway.php:7
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/maakapay-checkout-for-woocommerce/admin/partials/maakapay-for-woocommerce-checkout-admin-transaction-detail.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/maakapay-checkout-for-woocommerce/public/partials/maakapay-for-woocommerce-checkout-public-payment-success.php:16
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/maakapay-checkout-for-woocommerce/admin/partials/maakapay-for-woocommerce-checkout-admin-display.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/maakapay-checkout-for-woocommerce/public/partials/maakapay-for-woocommerce-checkout-public-payment-decline.php:15
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/maakapay-checkout-for-woocommerce/admin/partials/maakapay-for-woocommerce-checkout-admin-display.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === maakapay-checkout-for-woocommerce === )
You can take inspiration from this readme.txt

maakapay-checkout-for-woocommerce/maakapay-for-woocommerce-checkout.php 85% from 13 tests

The principal PHP file in "Maakapay Checkout For Woocommerce" v. 1.1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("maakapay-checkout-for-woocommerce.php" instead of "maakapay-for-woocommerce-checkout.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 154 characters long)

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 plugin1,048 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP133412231,047
CSS1061

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity10.00
▷ Minimum class complexity4.00
▷ Maximum class complexity25.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods18
▷ Static methods633.33%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin