90% wp-currency-exchange-rates

Code Review | WP Currency Exchange Rates

WordPress plugin WP Currency Exchange Rates scored90%from 54 tests.

About plugin

  • Plugin page: wp-currency-excha...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1
  • WordPress version: 6.3.1
  • First release: Aug 24, 2017
  • Latest release: Dec 24, 2022
  • Number of updates: 8
  • Update frequency: every 243.4 days
  • Top authors: algoritmika (87.5%)wpcodefactory (25%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,315 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.12MB] [CPU: ▼0.02ms] Passed 4 tests

An overview of server-side resources used by WP Currency Exchange Rates
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1436.84 ▼1.06
Dashboard /wp-admin3.42 ▲0.1246.83 ▼0.35
Posts /wp-admin/edit.php3.54 ▲0.1846.65 ▲0.20
Add New Post /wp-admin/post-new.php6.01 ▲0.1290.38 ▲1.13
Media Library /wp-admin/upload.php3.35 ▲0.1135.20 ▲2.00
Currency Exchange Rates /wp-admin/options-general.php?page=wp-currency-exchange-rates3.3138.60

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
alg_currency_exchange_rates_version
alg_cer_cron_data
widget_alg_currency_exchange_rates_wp_widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP Currency Exchange Rates
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.23 ▼1.054.30 ▲2.6739.79 ▼5.57
Dashboard /wp-admin2,210 ▲184.88 ▼0.01112.27 ▼0.4343.39 ▲1.00
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0540.21 ▼1.5436.15 ▼0.11
Add New Post /wp-admin/post-new.php1,532 ▲1818.49 ▲0.95596.08 ▼95.8060.15 ▲8.97
Media Library /wp-admin/upload.php1,395 ▲104.21 ▲0.0097.61 ▼4.2543.65 ▼0.48
Currency Exchange Rates /wp-admin/options-general.php?page=wp-currency-exchange-rates8322.0328.1441.61

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
  • This plugin does not fully uninstall, leaving 9 options in the database
    • can_compress_scripts
    • widget_alg_currency_exchange_rates_wp_widget
    • alg_currency_exchange_rates_version
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • alg_cer_cron_data

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 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
3 plugin tags: currency exchange rates, currency, exchange rates

wp-currency-exchange-rates/wp-currency-exchange-rates.php Passed 13 tests

The entry point to "WP Currency Exchange Rates" version 1.2.0 is a PHP file that has certain tags in its header comment area
38 characters long description:
Currency exchange rates for WordPress.

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
There were no executable files found in this plugin523 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP888370523

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity12.60
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods33
▷ Static methods13.03%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected