84% pal-for-contact-form

Code Review | PayPal for Contact Form 7

WordPress plugin PayPal for Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: pal-for-contact-form
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8.2
  • WordPress version: 6.3.1
  • First release: Aug 17, 2016
  • Latest release: Dec 6, 2021
  • Number of updates: 11
  • Update frequency: every 176.2 days
  • Top authors: wppaypalcontact (63.64%)palmoduledev (45.45%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /8,620 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.60ms] Passed 4 tests

An overview of server-side resources used by PayPal for Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.48 ▲2.10
Dashboard /wp-admin3.34 ▲0.0451.42 ▼0.20
Posts /wp-admin/edit.php3.39 ▲0.0350.26 ▼13.24
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.30 ▼8.06
Media Library /wp-admin/upload.php3.26 ▲0.0337.69 ▼0.90

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

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

Browser metrics Passed 4 tests

A check of browser resources used by PayPal for Contact Form 7
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.40 ▼0.141.72 ▲0.1044.36 ▲1.03
Dashboard /wp-admin2,204 ▲305.56 ▼0.1188.61 ▼4.9046.02 ▲7.13
Posts /wp-admin/edit.php2,109 ▲62.02 ▲0.0136.77 ▼4.4437.03 ▼2.71
Add New Post /wp-admin/post-new.php1,535 ▲923.03 ▼0.09665.47 ▼20.5363.96 ▲7.85
Media Library /wp-admin/upload.php1,412 ▲124.23 ▲0.12113.16 ▲2.3948.07 ▲1.15

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • pal_contact_form_notice_shown
    • widget_recent-comments

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pal-for-contact-form/admin/partials/class-pal-for-contact-form-general-setting.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt is a good inspiration

pal-for-contact-form/pal-for-contact-form.php Passed 13 tests

Analyzing the main PHP file in "PayPal for Contact Form 7" version 1.0.4
73 characters long description:
Integrate PayPal with Contact Form 7. Develop by Official PayPal Partner.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,048 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP121394111,010
JavaScript12035
CSS1003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity20.67
▷ Minimum class complexity1.00
▷ Maximum class complexity92.00
Average method complexity4.93
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods45
▷ Static methods1226.67%
▷ Public methods3986.67%
▷ Protected methods00.00%
▷ Private methods613.33%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin