79% wp-currency-exchange-rate

Code Review | WP Currency Exchange Rate

WordPress plugin WP Currency Exchange Rate scored79%from 54 tests.

About plugin

  • Plugin page: wp-currency-excha...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.3
  • WordPress version: 6.3.1
  • First release: Oct 26, 2019
  • Latest release: Oct 26, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: mi5t4n (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /401 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by WP Currency Exchange Rate
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1541.95 ▼7.77
Dashboard /wp-admin3.44 ▲0.1448.70 ▼4.53
Posts /wp-admin/edit.php3.55 ▲0.2052.93 ▲2.16
Add New Post /wp-admin/post-new.php6.04 ▲0.1588.42 ▼7.72
Media Library /wp-admin/upload.php3.36 ▲0.1341.58 ▲0.70
WP Currency Exchange Rate /wp-admin/options-general.php?page=wpcer-options-page3.3535.87

Server storage [IO: ▲0.09MB] [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: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
wp_currency_exchange_rate
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Currency Exchange Rate
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲12313.63 ▼1.179.01 ▲6.7644.09 ▼2.37
Dashboard /wp-admin2,229 ▲265.88 ▼0.02109.48 ▲1.7140.75 ▼4.67
Posts /wp-admin/edit.php2,108 ▲111.99 ▼0.0234.96 ▼2.2231.84 ▼7.97
Add New Post /wp-admin/post-new.php1,538 ▼1623.18 ▲5.04624.76 ▼19.0664.86 ▼2.94
Media Library /wp-admin/upload.php1,408 ▲84.21 ▲0.01110.42 ▼8.6246.55 ▼3.77
WP Currency Exchange Rate /wp-admin/options-general.php?page=wpcer-options-page1,2872.0225.9029.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • wp_currency_exchange_rate
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-currency-exchange-rate/admin/partials/wp-currency-exchange-rate-admin-usage-tab.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-currency-exchange-rate/admin/partials/wp-currency-exchange-rate-admin-settings-tab.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wp-currency-exchange-rate/admin/partials/wp-currency-exchange-rate-admin-display.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-currency-exchange-rate/admin/partials/wp-currency-exchange-rate-admin-tabs.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-currency-exchange-rate/public/partials/wp-currency-exchange-rate-public-display.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

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

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

The main PHP script in "WP Currency Exchange Rate" version 1.0.0 is automatically included on every request by WordPress
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

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
Success! There were no dangerous files found in this plugin812 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP202771,088720
JavaScript2279265
CSS281127

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.67
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods63
▷ Static methods1726.98%
▷ Public methods4774.60%
▷ Protected methods00.00%
▷ Private methods1625.40%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin