84% cf7-paystack-add-on

Code Review | Contact Form 7 - Paystack Add-on

WordPress plugin Contact Form 7 - Paystack Add-on scored84%from 54 tests.

About plugin

  • Plugin page: cf7-paystack-add-on
  • Plugin version: 1.2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.6
  • WordPress version: 6.3.1
  • First release: Aug 19, 2020
  • Latest release: Jan 15, 2021
  • Number of updates: 11
  • Update frequency: every 13.6 days
  • Top authors: crystalwebpro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,622 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.01MB] [CPU: ▼2.05ms] Passed 4 tests

Server-side resources used by Contact Form 7 - Paystack Add-on
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.08 ▼1.14
Dashboard /wp-admin3.31 ▲0.0148.09 ▲1.19
Posts /wp-admin/edit.php3.36 ▲0.0149.73 ▲3.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.32 ▼5.70
Media Library /wp-admin/upload.php3.24 ▲0.0136.60 ▼2.56

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
cf7ps_options

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form 7 - Paystack Add-on
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.21 ▼1.171.65 ▼0.1540.00 ▼4.71
Dashboard /wp-admin2,214 ▲294.84 ▼1.03109.44 ▲1.9442.85 ▼3.53
Posts /wp-admin/edit.php2,100 ▲111.98 ▼0.0140.05 ▲1.2836.93 ▲3.74
Add New Post /wp-admin/post-new.php1,553 ▲3918.11 ▲0.66641.08 ▼30.9950.89 ▼16.30
Media Library /wp-admin/upload.php1,402 ▲144.10 ▼0.09105.81 ▼8.3344.21 ▼6.40

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • cf7ps_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/cf7-paystack-add-on/cf7ps.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/cf7-paystack-add-on/includes/redirect.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: contact form 7, paystack donation addon, paystack, contact form

cf7-paystack-add-on/cf7ps.php 85% from 13 tests

The primary PHP file in "Contact Form 7 - Paystack Add-on" version 1.2.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("cf7-paystack-add-on.php" instead of "cf7ps.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
There were no executable files found in this plugin552 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP819464468
JavaScript29148
Markdown120032
CSS1004

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/paystack.png9.38KB4.75KB▼ 49.38%
assets/img/email-field.png50.68KB21.79KB▼ 56.99%
assets/img/paystack account.PNG36.04KB16.89KB▼ 53.13%
assets/img/paystack details on contact form 7.PNG31.85KB16.23KB▼ 49.03%
images/paystack_secure.png4.03KB3.84KB▼ 4.63%