83% simple-currency-converter

Code Review | Simple Currency Converter

WordPress plugin Simple Currency Converter scored 83% from 54 tests.

About plugin

  • Plugin page: simple-currency-c...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Aug 26, 2019
  • Latest release: Feb 11, 2020
  • Number of updates: 4
  • Update frequency: every 42.3 days
  • Top authors: ejincollective (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 540 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
Installer ran successfully

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

Analyzing server-side resources used by Simple Currency Converter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.67 ▼1.06
Dashboard /wp-admin3.32 ▲0.0246.59 ▼3.64
Posts /wp-admin/edit.php3.37 ▲0.0250.33 ▲1.04
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.58 ▲4.63
Media Library /wp-admin/upload.php3.24 ▲0.0239.93 ▲5.02

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Currency Converter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲8314.47 ▲0.171.81 ▼0.0444.24 ▼1.99
Dashboard /wp-admin2,221 ▲365.84 ▲0.0499.11 ▼17.8737.89 ▼11.11
Posts /wp-admin/edit.php2,106 ▲202.03 ▲0.0439.94 ▲1.8438.42 ▲4.23
Add New Post /wp-admin/post-new.php1,527 ▼617.67 ▼5.54662.68 ▼5.0973.19 ▲15.36
Media Library /wp-admin/upload.php1,409 ▲214.21 ▼0.0097.82 ▼3.2946.17 ▼0.49

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

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

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CurrencyConverter\\add_action() in wp-content/plugins/simple-currency-converter/plugin.php:93

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Widget running in preview.), #2 (Widget running on live site.)
The official readme.txt might help

simple-currency-converter/currency-converter.php 85% from 13 tests

The entry point to "Simple Currency Converter" version 1.2.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("simple-currency-converter.php" instead of "currency-converter.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,121 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS115711777
PHP464248237
JavaScript29666
Markdown117041

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.33
▷ Minimum class complexity2.00
▷ Maximum class complexity7.00
Average method complexity1.53
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods19
▷ Static methods15.26%
▷ Public methods1578.95%
▷ Protected methods315.79%
▷ Private methods15.26%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.06MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/screenshot-1.png44.64KB10.25KB▼ 77.05%
screenshots/screentshot-2.png15.50KB2.75KB▼ 82.28%