84% simple-paypal-button-for-visual-composer

Code Review | Simple Paypal Button For Visual Composer

WordPress plugin Simple Paypal Button For Visual Composer scored84%from 54 tests.

About plugin

  • Plugin page: simple-paypal-but...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 6.3.1
  • First release: Jun 17, 2016
  • Latest release: Jun 18, 2016
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: kirit-dholakiya (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,337 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.90ms] Passed 4 tests

Server-side resources used by Simple Paypal Button For Visual Composer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0531.75 ▼11.42
Dashboard /wp-admin3.35 ▲0.0540.26 ▼11.94
Posts /wp-admin/edit.php3.40 ▲0.0547.38 ▲4.71
Add New Post /wp-admin/post-new.php5.93 ▲0.0582.53 ▼10.13
Media Library /wp-admin/upload.php3.27 ▲0.0434.74 ▼2.11

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Simple Paypal Button For Visual Composer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6813.22 ▼1.323.89 ▲2.1237.97 ▼7.09
Dashboard /wp-admin2,215 ▲274.84 ▼1.05111.10 ▼7.4743.15 ▼0.53
Posts /wp-admin/edit.php2,103 ▲142.05 ▲0.0340.12 ▲4.7735.67 ▲3.55
Add New Post /wp-admin/post-new.php1,559 ▲2618.28 ▼4.84624.89 ▼55.7367.44 ▲13.22
Media Library /wp-admin/upload.php1,403 ▲124.23 ▲0.0896.25 ▼10.7340.16 ▼6.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/simple-paypal-button-for-visual-composer/vc_paypal_button.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: paypal button, payment, visual composer, visual composer addon, payments...

simple-paypal-button-for-visual-composer/vc_paypal_button.php 92% from 13 tests

The entry point to "Simple Paypal Button For Visual Composer" version 1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("simple-paypal-button-for-visual-composer.php" instead of "vc_paypal_button.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin297 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP23248284
CSS24912
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin