83% currency-converter-widget

Code Review | Currency Converter Widget - Exchange Rates

WordPress plugin Currency Converter Widget - Exchange Rates scored83%from 54 tests.

About plugin

  • Plugin page: currency-converte...
  • Plugin version: 3.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 29, 2017
  • Latest release: Sep 7, 2023
  • Number of updates: 34
  • Update frequency: every 66.9 days
  • Top authors: currencywiki (100%)

Code review

54 tests

User reviews

80 reviews

Install metrics

3,000+ active /30,440 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼5.65ms] Passed 4 tests

An overview of server-side resources used by Currency Converter Widget - Exchange Rates
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2040.93 ▼6.66
Dashboard /wp-admin3.50 ▲0.1549.36 ▼17.36
Posts /wp-admin/edit.php3.61 ▲0.2552.84 ▲1.32
Add New Post /wp-admin/post-new.php6.10 ▲0.21102.84 ▲0.11
Media Library /wp-admin/upload.php3.42 ▲0.1939.41 ▲2.27

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_bcc_currency_widget
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Currency Converter Widget - Exchange Rates
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲8014.22 ▼0.511.72 ▼0.1544.13 ▼1.62
Dashboard /wp-admin2,247 ▲705.71 ▲0.1485.97 ▼4.2782.57 ▲42.53
Posts /wp-admin/edit.php2,158 ▲582.15 ▲0.2041.62 ▲5.3934.70 ▼1.81
Add New Post /wp-admin/post-new.php1,574 ▲4823.06 ▼0.43717.22 ▲47.3363.72 ▲5.27
Media Library /wp-admin/upload.php1,452 ▲524.26 ▲0.04114.68 ▲12.0080.14 ▲36.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_bcc_currency_widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/currency-converter-widget/bcc-widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Example of Currency Converter widget for sidebar to change the color, size, language, and default currency pair.), #2 (Example parameters to generate shorcode w/specific color.), #3 (Example of manual size input for width and height.), #4 (Color change example by customizing font as black and style as white.), #5 (Example of random color selection.), #6 (Example of language selection.)
  • Contributors: Plugin contributors not specified
The official readme.txt might help

currency-converter-widget/currency-converter-widget.php 92% from 13 tests

Analyzing the main PHP file in "Currency Converter Widget - Exchange Rates" version 3.0.2
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 287 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected5,988 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP7100453,754
JavaScript558482,116
CSS203118

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity66.50
▷ Minimum class complexity13.00
▷ Maximum class complexity120.00
Average method complexity9.19
▷ Minimum method complexity1.00
▷ Maximum method complexity78.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods212.50%
▷ Public methods1487.50%
▷ Protected methods00.00%
▷ Private methods212.50%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.63MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-6.png105.50KB36.86KB▼ 65.06%
screenshot-4.png94.16KB33.82KB▼ 64.09%
img/rating_logo.png12.56KB4.78KB▼ 61.94%
screenshot-1.png98.71KB37.22KB▼ 62.29%
screenshot-3.png97.79KB34.63KB▼ 64.59%