83% prismpay-woocommerce

Code Review | PrismPay for WooCommerce

WordPress plugin PrismPay for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: prismpay-woocommerce
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 12, 2020
  • Latest release: Apr 22, 2020
  • Number of updates: 3
  • Update frequency: every 15.7 days
  • Top authors: ppshoppingcarts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,114 total downloads

Benchmarks

Plugin footprint 82% 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.06MB] [CPU: ▼7.90ms] Passed 4 tests

An overview of server-side resources used by PrismPay for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.22 ▼3.39
Dashboard /wp-admin3.37 ▲0.0348.55 ▼16.91
Posts /wp-admin/edit.php3.42 ▲0.0752.11 ▲0.08
Add New Post /wp-admin/post-new.php5.95 ▲0.0786.30 ▼11.39
Media Library /wp-admin/upload.php3.29 ▲0.0741.05 ▲5.73

Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please try to fix the following items
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/prismpay-woocommerce/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for PrismPay for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.47 ▼0.535.13 ▲3.2145.89 ▼2.36
Dashboard /wp-admin2,221 ▲154.85 ▼1.05103.55 ▼5.3443.17 ▼10.69
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0135.28 ▼1.6831.94 ▼4.84
Add New Post /wp-admin/post-new.php1,540 ▲923.33 ▲0.01662.01 ▼18.0158.70 ▲2.78
Media Library /wp-admin/upload.php1,403 ▲34.19 ▼0.0496.25 ▼6.2345.44 ▼0.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

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
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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/prismpay-woocommerce/prismpay-for-woocommerce.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === PrismPay for WooCommerce === )
You can look at the official readme.txt

prismpay-woocommerce/prismpay-for-woocommerce.php 92% from 13 tests

The main PHP script in "PrismPay for WooCommerce" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("prismpay-woocommerce.php" instead of "prismpay-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected509 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16739509

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity4.21
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1071.43%
▷ Protected methods00.00%
▷ Private methods428.57%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin