83% wp-ecommerce-quickpay

Code Review | WP eCommerce Quickpay

WordPress plugin WP eCommerce Quickpay scored83%from 54 tests.

About plugin

  • Plugin page: wp-ecommerce-quic...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-5.7.2
  • WordPress version: 6.3.1
  • First release: May 7, 2015
  • Latest release: Jun 30, 2021
  • Number of updates: 15
  • Update frequency: every 150.1 days
  • Top authors: PerfectSolution (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,975 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼1.14ms] Passed 4 tests

Analyzing server-side resources used by WP eCommerce Quickpay
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2435.69 ▼6.34
Dashboard /wp-admin3.57 ▲0.2645.95 ▲4.58
Posts /wp-admin/edit.php3.62 ▲0.2646.81 ▼4.35
Add New Post /wp-admin/post-new.php6.10 ▲0.2189.78 ▲5.66
Media Library /wp-admin/upload.php3.43 ▲0.1936.30 ▲1.57
Quickpay logs /wp-admin/tools.php?page=wpec-qp-logs3.4031.54

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP eCommerce Quickpay
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.29 ▼1.014.72 ▲2.6343.85 ▼1.34
Dashboard /wp-admin2,221 ▲334.86 ▼1.00117.04 ▲1.2357.64 ▲10.75
Posts /wp-admin/edit.php2,107 ▲182.05 ▲0.0440.04 ▼2.9238.86 ▲2.52
Add New Post /wp-admin/post-new.php1,525 ▼1723.04 ▲4.54626.67 ▲13.8753.20 ▼0.18
Media Library /wp-admin/upload.php1,397 ▲64.23 ▲0.08100.23 ▲0.4140.04 ▼4.91
Quickpay logs /wp-admin/tools.php?page=wpec-qp-logs7982.0724.3624.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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)
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
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WPEC_QP_API_Transaction' not found in wp-content/plugins/wp-ecommerce-quickpay/includes/classes/api/wpec-qp-api-payment.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-ecommerce-quickpay/vendor/quickpay/quickpay-php-client/Tests/api/ExceptionTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-ecommerce-quickpay/vendor/quickpay/quickpay-php-client/Tests/api/ResponseTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-ecommerce-quickpay/vendor/quickpay/quickpay-php-client/Tests/api/RequestTest.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-ecommerce-quickpay/includes/functions.php:227
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-ecommerce-quickpay/wp-e-commerce-quickpay.php:106
    • > PHP Fatal error
      Uncaught Error: Class 'WPEC_QP_API' not found in wp-content/plugins/wp-ecommerce-quickpay/includes/classes/api/wpec-qp-api-transaction.php:14

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

wp-ecommerce-quickpay/wp-e-commerce-quickpay.php 85% from 13 tests

"WP eCommerce Quickpay" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-ecommerce-quickpay.php" instead of "wp-e-commerce-quickpay.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 plugin1,781 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP263979931,388
Markdown2500121
JavaScript1162102
JSON20067
YAML26045
CSS13632
XML20126

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.95
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.99
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods109
▷ Static methods1412.84%
▷ Public methods10495.41%
▷ Protected methods32.75%
▷ Private methods21.83%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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 files were detected