84% wp-currencies

Code Review | WP Currencies

WordPress plugin WP Currencies scored84%from 54 tests.

About plugin

  • Plugin page: wp-currencies
  • Plugin version: 1.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 14, 2014
  • Latest release: Jun 29, 2015
  • Number of updates: 36
  • Update frequency: every 9.9 days
  • Top authors: nekojira (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /8,283 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: ▼6.27ms] Passed 4 tests

Analyzing server-side resources used by WP Currencies
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1339.12 ▼2.52
Dashboard /wp-admin3.50 ▲0.1247.06 ▼17.07
Posts /wp-admin/edit.php3.61 ▲0.2251.87 ▲2.19
Add New Post /wp-admin/post-new.php6.08 ▲0.1691.31 ▼7.66
Media Library /wp-admin/upload.php3.42 ▲0.1639.05 ▲5.11
Currencies /wp-admin/options-general.php?page=wp_currencies3.3932.00

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: no files
Database: 1 new table, 6 new options
New tables
wp_currencies
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP Currencies
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3314.74 ▲0.461.65 ▼0.2438.37 ▼1.35
Dashboard /wp-admin2,213 ▲225.85 ▲0.90108.10 ▲2.3442.95 ▲2.85
Posts /wp-admin/edit.php2,093 ▲11.99 ▼0.0135.60 ▼5.6834.12 ▼2.46
Add New Post /wp-admin/post-new.php1,541 ▲623.37 ▲0.25707.70 ▲70.0552.25 ▼3.88
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.1394.18 ▼8.6439.74 ▼2.59
Currencies /wp-admin/options-general.php?page=wp_currencies8472.0525.1127.70

Uninstaller [IO: ✅] [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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-currencies/wp-currencies.php:56

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: exchange-rates, currencies, acf, ecommerce, currency...

wp-currencies/wp-currencies.php 92% from 13 tests

The main file in "WP Currencies" v. 1.4.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,404 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP143628001,232
PO File1286181
Markdown226070
JSON10021

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity10.22
▷ Minimum class complexity2.00
▷ Maximum class complexity29.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods48
▷ Static methods612.50%
▷ Public methods4593.75%
▷ Protected methods00.00%
▷ Private methods36.25%
Functions17
▷ Named functions1270.59%
▷ Anonymous functions529.41%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin