10% wpec-targetpay-for-wp-e-commerce

Code Review | WPEC Targetpay for WP E-Commerce

WordPress plugin WPEC Targetpay for WP E-Commerce scored 10% from 54 tests.

About plugin

  • Plugin page: wpec-targetpay-fo...
  • Plugin version: 1.000
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0.0-4.9
  • WordPress version: 6.3.1
  • First release: Oct 26, 2015
  • Latest release: Nov 12, 2017
  • Number of updates: 14
  • Update frequency: every 53.9 days
  • Top authors: seuser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 732 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/wpec-targetpay-for-wp-e-commerce/wpec-targetpay.php+17
    require_once(wp-content/plugins/wpec-targetpay-for-wp-e-commerce/../wp-e-commerce/wpsc-includes/merchant.class.php): failed to open stream: No such file or directory

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.20ms] Passed 4 tests

Analyzing server-side resources used by WPEC Targetpay for WP E-Commerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.68 ▼1.81
Dashboard /wp-admin3.31 ▲0.0043.65 ▼6.38
Posts /wp-admin/edit.php3.36 ▲0.0044.18 ▼0.69
Add New Post /wp-admin/post-new.php5.89 ▲0.00106.43 ▲9.95
Media Library /wp-admin/upload.php3.23 ▲0.0033.34 ▲0.07

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPEC Targetpay for WP E-Commerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.361.64 ▼0.3639.27 ▼3.64
Dashboard /wp-admin2,206 ▲145.79 ▲0.83101.03 ▼13.3744.36 ▲4.89
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0334.78 ▼4.5235.59 ▼2.01
Add New Post /wp-admin/post-new.php1,519 ▲523.19 ▲5.76664.84 ▲0.9952.34 ▲5.78
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0093.86 ▼5.5542.78 ▼5.23

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'wpsc_merchant' not found in wp-content/plugins/wpec-targetpay-for-wp-e-commerce/classes/wpscTargetpay.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wpec-targetpay-for-wp-e-commerce/wpec-targetpay.php:17

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 96% 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: wpsc, targetpay, ideal, wp-e-commerce

wpec-targetpay-for-wp-e-commerce/wpec-targetpay.php 92% from 13 tests

The main PHP script in "WPEC Targetpay for WP E-Commerce" version 1.000 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpec-targetpay-for-wp-e-commerce.php" instead of "wpec-targetpay.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin392 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3129233375
CSS21016
JavaScript1021

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity21.50
▷ Minimum class complexity6.00
▷ Maximum class complexity37.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1147.83%
▷ Protected methods00.00%
▷ Private methods1252.17%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin