78% wp-e-commerce-currency-helper

Code Review | WP E-Commerce currency helper

WordPress plugin WP E-Commerce currency helper scored 78% from 54 tests.

About plugin

  • Plugin page: wp-e-commerce-cur...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Aug 9, 2012
  • Latest release: Mar 15, 2014
  • Number of updates: 16
  • Update frequency: every 36.4 days
  • Top authors: haet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 7,103 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.17ms] Passed 4 tests

An overview of server-side resources used by WP E-Commerce currency helper
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.04 ▼1.90
Dashboard /wp-admin3.39 ▲0.0946.17 ▼19.93
Posts /wp-admin/edit.php3.51 ▲0.1546.21 ▲3.18
Add New Post /wp-admin/post-new.php5.97 ▲0.0883.62 ▼6.03
Media Library /wp-admin/upload.php3.32 ▲0.0836.39 ▲4.79

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 409 new files
Database: 1 new table, 7 new options
New tables
wp_haet_currency_list
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
haetcurrency_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

WP E-Commerce currency helper: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲15714.31 ▼0.067.32 ▲5.1642.99 ▼7.06
Dashboard /wp-admin2,207 ▲225.85 ▼0.00100.64 ▼2.0439.31 ▲0.47
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0234.45 ▼0.8436.24 ▲2.49
Add New Post /wp-admin/post-new.php1,538 ▲823.35 ▲5.11712.91 ▲64.2266.88 ▲13.75
Media Library /wp-admin/upload.php1,395 ▲74.34 ▲0.1295.13 ▼4.3040.11 ▼3.22
Currency Converter /wp-admin/wp-e-commerce-currency-helper.php260.440.1114.16

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
    • widget_recent-comments
    • widget_recent-posts
    • haetcurrency_options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% 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 | 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
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to a member function query() on null in wp-content/plugins/wp-e-commerce-currency-helper/includes/installation/currency_list.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-e-commerce-currency-helper/wp-e-commerce-currency-helper.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-e-commerce-currency-helper/views/admin/settings.php:4
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/wp-e-commerce-currency-helper/includes/installation/currency_list.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/wp-e-commerce-currency-helper.php
    • > Network (severe)
    wp-admin/wp-e-commerce-currency-helper.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The bubble tooltip appears on every currency field in your store), #2 (Users can customize and save their target currency), #3 (Import Settings from your store (WPSC or EDD)), #4 (Select a theme for the bubbles), #5 (Check internal currencylist against the Google Conversion API and remove unsupported currencies.)
  • Tags: You are using too many tags: 11 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-e-commerce-currency-helper/wp-e-commerce-currency-helper.php Passed 13 tests

"WP E-Commerce currency helper" version 1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
54 characters long description:
convert all price fields in your store to any currency

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,653 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP51271251,370
PO File253105155
JavaScript2222281
CSS1102847

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1376.47%
▷ Protected methods00.00%
▷ Private methods423.53%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
195 PNG files occupy 0.56MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jquery-bubble-popup/jquerybubblepopup-themes/blue/middle-left.png0.23KB0.12KB▼ 48.94%
jquery-bubble-popup/jquerybubblepopup-themes/orange/tail-top.png0.31KB0.20KB▼ 33.65%
jquery-bubble-popup/jquerybubblepopup-themes/grey/tail-right.png0.30KB0.19KB▼ 36.84%
jquery-bubble-popup/jquerybubblepopup-themes/all-orange/bottom-right.png0.28KB0.17KB▼ 40.00%
jquery-bubble-popup/jquerybubblepopup-themes/green/top-right.png0.30KB0.18KB▼ 38.64%