84% camptix-trustpay

Code Review | CampTix TrustPay Payment Gateway

WordPress plugin CampTix TrustPay Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: camptix-trustpay
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2015
  • Latest release: Mar 6, 2015
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: JohnnyPea (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,393 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by CampTix TrustPay Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0141.47 ▲0.60
Dashboard /wp-admin3.31 ▲0.0044.83 ▼4.61
Posts /wp-admin/edit.php3.36 ▲0.0044.59 ▼3.76
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.69 ▼1.28
Media Library /wp-admin/upload.php3.23 ▲0.0033.49 ▲2.21

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by CampTix TrustPay Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.34 ▼1.421.85 ▼0.1938.00 ▼12.47
Dashboard /wp-admin2,206 ▲274.85 ▼0.09106.01 ▼10.6141.68 ▼1.51
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0240.75 ▲3.0934.93 ▼0.50
Add New Post /wp-admin/post-new.php1,543 ▲1018.34 ▼4.99604.66 ▼67.2152.43 ▼0.67
Media Library /wp-admin/upload.php1,391 ▼04.22 ▲0.0392.24 ▼7.3743.40 ▲2.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WI_Trustpay' not found in wp-content/plugins/camptix-trustpay/wi-trustpay-response.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CampTix_Payment_Method' not found in wp-content/plugins/camptix-trustpay/payment-trustpay.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WI_Trustpay' not found in wp-content/plugins/camptix-trustpay/wi-trustpay-request.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 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
2 plugin tags: trustpay, camptix

camptix-trustpay/camptix-trustpay.php Passed 13 tests

The main PHP file in "CampTix TrustPay Payment Gateway" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
53 characters long description:
TrustPay Payment Gateway for CampTix Event Ticketing.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected408 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP510965408

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity21.00
▷ Minimum class complexity2.00
▷ Maximum class complexity37.00
Average method complexity4.81
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods21
▷ Static methods29.52%
▷ Public methods1571.43%
▷ Protected methods628.57%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants00.00%
▷ Class constants14100.00%
▷ Public constants14100.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