72% easy-currency-converter

Code Review | Easy Currency Converter Plugin

WordPress plugin Easy Currency Converter Plugin scored72%from 54 tests.

About plugin

  • Plugin page: easy-currency-con...
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Oct 25, 2018
  • Latest release: Aug 26, 2020
  • Number of updates: 12
  • Update frequency: every 55.9 days
  • Top authors: easycurrencyconverter (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

30+ active /2,380 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.68MB] [CPU: ▼0.96ms] Passed 4 tests

Server-side resources used by Easy Currency Converter Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.6045.96 ▲2.97
Dashboard /wp-admin4.03 ▲0.6960.76 ▼7.19
Posts /wp-admin/edit.php4.08 ▲0.7358.96 ▲8.02
Add New Post /wp-admin/post-new.php6.68 ▲0.8091.84 ▼5.92
Media Library /wp-admin/upload.php3.96 ▲0.7345.10 ▲6.30
Add New /wp-admin/post-new.php?post_type=ecc-converters5.4256.93
All Converters /wp-admin/edit.php?post_type=ecc-converters3.9643.06

Server storage [IO: ▲5.10MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please fix the following
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/easy-currency-converter/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 255 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Easy Currency Converter Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲11613.20 ▼1.555.30 ▲3.6244.51 ▲1.31
Dashboard /wp-admin2,251 ▲484.91 ▼1.07100.14 ▼19.0186.59 ▲39.85
Posts /wp-admin/edit.php2,130 ▲271.97 ▼0.0635.87 ▲0.4134.61 ▲2.53
Add New Post /wp-admin/post-new.php6,235 ▲4,70919.02 ▲1.48962.37 ▲277.5740.92 ▼11.29
Media Library /wp-admin/upload.php1,424 ▲244.29 ▲0.05104.44 ▼1.1073.83 ▲25.98
Add New /wp-admin/post-new.php?post_type=ecc-converters5,7982.9163.8277.66
All Converters /wp-admin/edit.php?post_type=ecc-converters1,1141.9331.7034.76

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=ecc-converters
    • > Warning in wp-content/plugins/easy-currency-converter/inc/posttypes/ecc-converter.php+61
    Use of undefined constant FF_PLG_NAME - assumed 'FF_PLG_NAME' (this will throw an Error in a future version of PHP)

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
Please fix the following items
  • 123× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant VP_PUBLIC_URL - assumed 'VP_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-currency-converter/framework/config/dependencies.php on line 172
    • > PHP Notice
      Undefined variable: is_compact in wp-content/plugins/easy-currency-converter/framework/views/control/codeeditor.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_FieldMulti' not found in wp-content/plugins/easy-currency-converter/framework/classes/control/field/fontawesome.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'VP_View' not found in wp-content/plugins/easy-currency-converter/framework/views/control/date.php:1
    • > PHP Warning
      Use of undefined constant VP_PUBLIC_URL - assumed 'VP_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-currency-converter/framework/config/dependencies.php on line 100
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Security' not found in wp-content/plugins/easy-currency-converter/framework/data/sources.php:97
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/easy-currency-converter/framework/views/control/html.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Util_Text' not found in wp-content/plugins/easy-currency-converter/framework/views/option/section.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'VP_Control_Field' not found in wp-content/plugins/easy-currency-converter/framework/classes/control/field/codeeditor.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'VP_FileSystem' not found in wp-content/plugins/easy-currency-converter/framework/classes/metabox/alchemy.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/post-new.php?post_type=ecc-converters
    • > Javascript (severe) in unknown
    /wp-content/plugins/easy-currency-converter/framework/public/js/vendor/jquery.tipsy.js?ver=1.0.0a 179:24 Uncaught TypeError: this[binder] is not a function
    • > GET request to /wp-admin/post-new.php?post_type=ecc-converters
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: vp.init_ace_editor is not a function" "TypeError: vp.init_ace_editor is not a function\n at vp.init_controls (/wp-content/plugins/easy-currency-converter/framework/public/js/shared.min.js?ver=1.1:1:18433)\n at HTMLDivElement.\u003Canonymous> (/wp-content/plugins/easy-currency-converter/framework/public/js/metabox.min.js?ver=6.3.1:1:975)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:3129)\n at e.\u003Ccomputed>.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:1594)\n at e (/wp-content/plugins/easy-currency-converter/framework/public/js/metabox.min.js?ver=6.3.1:1:915)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/easy-currency-converter/framework/public/js/metabox.min.js?ver=6.3.1:1:2532)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=ecc-converters
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: vp.init_ace_editor is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: currency, converter, currency value, currency converter, real time converter

easy-currency-converter/ecc-easy-currency-converter.php 85% from 13 tests

This is the main PHP file of "Easy Currency Converter Plugin" version 1.5.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 270 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-currency-converter.php" instead of "ecc-easy-currency-converter.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected40,180 lines of code in 200 files:
LanguageFilesBlank linesComment linesLines of code
JSON50013,061
JavaScript591,5461,77011,630
PHP1002,1492,4919,355
CSS211782173,597
Vuejs Component53351,509
PO File1205298453
SVG100414
Markdown3390106
Sass33138
HTML20117

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 102)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity21.07
▷ Minimum class complexity1.00
▷ Maximum class complexity272.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity102.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes57
▷ Abstract classes47.02%
▷ Concrete classes5392.98%
▷ Final classes00.00%
Methods508
▷ Static methods8917.52%
▷ Public methods47593.50%
▷ Protected methods193.74%
▷ Private methods142.76%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants40
▷ Global constants3792.50%
▷ Class constants37.50%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
25 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
framework/public/img/vp_shortcode_icon.png1.13KB0.18KB▼ 84.22%
framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
framework/public/img/bootstrap-colorpicker/hue.png2.90KB0.50KB▼ 82.71%
framework/public/css/vendor/jqueryui/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%