84% smart-currency-converter

Code Review | Smart Currency Converter

WordPress plugin Smart Currency Converter scored84%from 54 tests.

About plugin

  • Plugin page: smart-currency-co...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.6.1
  • WordPress version: 6.3.1
  • First release: Sep 14, 2016
  • Latest release: Sep 14, 2016
  • Number of updates: 7
  • Update frequency: every 19.6 days
  • Top authors: currencyrates (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

30+ active /3,296 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.74ms] Passed 4 tests

This is a short check of server-side resources used by Smart Currency Converter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.93 ▲0.42
Dashboard /wp-admin3.34 ▲0.0452.20 ▲1.84
Posts /wp-admin/edit.php3.39 ▲0.0450.06 ▼0.06
Add New Post /wp-admin/post-new.php5.92 ▲0.0489.71 ▼5.17
Media Library /wp-admin/upload.php3.27 ▲0.0439.95 ▲4.86

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_crconverterwidget
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Smart Currency Converter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲15713.56 ▼0.7310.08 ▲8.0743.02 ▼2.55
Dashboard /wp-admin2,214 ▲264.86 ▼0.24105.93 ▼5.3338.65 ▼7.76
Posts /wp-admin/edit.php2,100 ▲142.04 ▲0.0137.03 ▲0.4432.87 ▼2.88
Add New Post /wp-admin/post-new.php1,524 ▲1023.27 ▲5.80676.77 ▲5.2458.96 ▲5.14
Media Library /wp-admin/upload.php1,396 ▲114.23 ▲0.01105.68 ▲2.6245.48 ▲4.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_crconverterwidget
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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
Even though no errors were found, this is by no means 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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/smart-currency-converter/smart-currency-converter.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Converter Setup), #2 (Sidebar), #3 (Currency Dropdown), #4 (Converter in-action)
Please take inspiration from this readme.txt

smart-currency-converter/smart-currency-converter.php Passed 13 tests

Analyzing the main PHP file in "Smart Currency Converter" version 1.0
77 characters long description:
A customizable currency converter widget with support for over 70 currencies!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected1,070 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS21610890
PHP12210133
JavaScript219347

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods466.67%
▷ Protected methods00.00%
▷ Private methods233.33%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-4.png18.85KB5.39KB▼ 71.41%
assets/screenshot-3.png36.74KB10.00KB▼ 72.79%
assets/screenshot-1.png28.04KB7.91KB▼ 71.80%
assets/images/flags.png12.13KB12.93KB0.00%
assets/screenshot-2.png15.99KB4.68KB▼ 70.77%