84% wp-e-commerce-custom-fields

Code Review | WP e-Commerce - Custom Fields

WordPress plugin WP e-Commerce - Custom Fields scored84%from 54 tests.

About plugin

  • Plugin page: wp-e-commerce-cus...
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-5.0
  • WordPress version: 6.3.1
  • First release: Jan 19, 2012
  • Latest release: Dec 10, 2018
  • Number of updates: 38
  • Update frequency: every 66.2 days
  • Top authors: visser (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /22,036 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
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼0.73ms] Passed 4 tests

An overview of server-side resources used by WP e-Commerce - Custom Fields
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1240.94 ▼0.21
Dashboard /wp-admin3.87 ▲0.571,004.76 ▲956.21
Posts /wp-admin/edit.php3.54 ▲0.1954.10 ▲2.29
Add New Post /wp-admin/post-new.php6.01 ▲0.1387.64 ▼9.03
Media Library /wp-admin/upload.php3.35 ▲0.1340.40 ▲4.04

Server storage [IO: ▲0.11MB] [DB: ▲0.05MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 10 new options
New WordPress options
wpsc_cf_display_title
widget_recent-comments
wpsc_cf_title_text
wpsc_cf_position
wpsc_cf_layout
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP e-Commerce - Custom Fields
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,978 ▲21713.28 ▼1.311.75 ▼0.3832.34 ▼14.07
Dashboard /wp-admin2,384 ▲1845.90 ▲1.00100.89 ▼3.8944.27 ▼2.25
Posts /wp-admin/edit.php2,097 ▼62.14 ▲0.1436.62 ▼4.9032.87 ▼5.59
Add New Post /wp-admin/post-new.php1,531 ▼023.18 ▲2.08680.56 ▲2.3462.79 ▲11.15
Media Library /wp-admin/upload.php1,400 ▼34.23 ▲0.0594.67 ▼5.0345.97 ▼4.33

Uninstaller [IO: ▲0.00MB] [DB: ▲0.05MB] 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
  • Zombie WordPress options detected upon uninstall: 10 options
    • wpsc_cf_title_text
    • wpsc_cf_position
    • wpsc_cf_display_title
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • wpsc_cf_layout
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 19× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/wp-e-commerce-custom-fields/templates/admin/wpsc-admin_cf_manage-detail.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-e-commerce-custom-fields/includes/common.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-e-commerce-custom-fields/includes/release-3_7.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-e-commerce-custom-fields/includes/template.php:2
    • > PHP Notice
      Undefined variable: wp_plugins in wp-content/plugins/wp-e-commerce-custom-fields/templates/admin/wpsc-admin_dashboard_vm-plugins.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-e-commerce-custom-fields/templates/admin/wpsc-admin_dashboard_vm-plugins.php:48
    • > PHP Notice
      Undefined variable: custom_fields in wp-content/plugins/wp-e-commerce-custom-fields/templates/store/wpsc-single_product_customfields_table.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-e-commerce-custom-fields/templates/admin/wpsc-admin_cf_manage.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-e-commerce-custom-fields/includes/update.php:8
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/wp-e-commerce-custom-fields/templates/admin/wpsc-admin_cf_manage-detail.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: wp-e-commerce, e-commerce, mod, store templating, custom fields

wp-e-commerce-custom-fields/custom-fields.php 92% from 13 tests

Analyzing the main PHP file in "WP e-Commerce - Custom Fields" version 1.6
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-e-commerce-custom-fields.php" instead of "custom-fields.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin2,279 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP18377741,341
JavaScript19016882
CSS10056

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
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%
Functions63
▷ Named functions63100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin