84% camptix-trustcard

Code Review | CampTix TrustCard Payment Gateway

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

About plugin

  • Plugin page: camptix-trustcard
  • 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: 6
  • Update frequency: every 0.5 days
  • Top authors: JohnnyPea (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,350 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: ▼1.64ms] Passed 4 tests

Analyzing server-side resources used by CampTix TrustCard Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.93 ▼6.69
Dashboard /wp-admin3.31 ▲0.0150.82 ▲0.43
Posts /wp-admin/edit.php3.36 ▲0.0053.35 ▲5.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.95 ▼0.87
Media Library /wp-admin/upload.php3.23 ▲0.0037.12 ▲0.57

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for CampTix TrustCard Payment Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▲0.101.73 ▼0.3148.95 ▲4.54
Dashboard /wp-admin2,198 ▲215.63 ▲0.0590.65 ▼2.4737.97 ▼2.41
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0840.14 ▲3.7036.68 ▲1.41
Add New Post /wp-admin/post-new.php1,526 ▼023.71 ▲0.48638.46 ▼16.3055.40 ▼9.26
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.1096.39 ▼7.9047.68 ▼0.60

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WI_Trustcard' not found in wp-content/plugins/camptix-trustcard/wi-trustcard-request.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WI_Trustcard' not found in wp-content/plugins/camptix-trustcard/wi-trustcard-response.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CampTix_Payment_Method' not found in wp-content/plugins/camptix-trustcard/payment-trustcard.php:2

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 uses markdown syntax to describe your plugin to the world
2 plugin tags: trustpay, camptix

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

The main PHP file in "CampTix TrustCard Payment Gateway" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
54 characters long description:
TrustCard 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 detected418 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP510969418

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity22.50
▷ Minimum class complexity2.00
▷ Maximum class complexity43.00
Average method complexity5.10
▷ Minimum method complexity1.00
▷ Maximum method complexity32.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%
Constants15
▷ Global constants00.00%
▷ Class constants15100.00%
▷ Public constants15100.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
There were not PNG files found in your plugin