84% sfx-exchange-rates

Code Review | SFX Exchange rates

WordPress plugin SFX Exchange rates scored84%from 54 tests.

About plugin

  • Plugin page: sfx-exchange-rates
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5.3
  • WordPress version: 6.3.1
  • First release: Nov 26, 2020
  • Latest release: Nov 26, 2020
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: safaksaracoglu2012 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /415 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.11MB] [CPU: ▼0.86ms] Passed 4 tests

Server-side resources used by SFX Exchange rates
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1143.90 ▲2.97
Dashboard /wp-admin3.42 ▲0.1249.40 ▲1.83
Posts /wp-admin/edit.php3.53 ▲0.1877.57 ▲25.68
Add New Post /wp-admin/post-new.php6.00 ▲0.1183.74 ▼12.36
Media Library /wp-admin/upload.php3.32 ▲0.0936.11 ▲4.14
/wp-admin/admin.php?page=process_admin3.1524.77

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 61 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_sfxexchangerates_widget
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for SFX Exchange rates
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,100 ▲35415.60 ▲0.988.04 ▲5.4538.85 ▼7.83
Dashboard /wp-admin2,365 ▲1776.83 ▲0.79142.47 ▲42.0183.40 ▲47.75
Posts /wp-admin/edit.php2,286 ▲1973.63 ▲1.5965.42 ▲26.3177.19 ▲41.65
Add New Post /wp-admin/post-new.php1,543 ▲123.26 ▲4.98650.04 ▲9.19159.56 ▲102.76
Media Library /wp-admin/upload.php1,422 ▲344.41 ▲0.2288.49 ▼16.4569.32 ▲24.24
/wp-admin/admin.php?page=process_admin80.440.080.13

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_sfxexchangerates_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/sfx-exchange-rates/core/cons.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sfx-exchange-rates/controller/admin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/sfx-exchange-rates/classes/virtualpage.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sfx-exchange-rates/controller/front.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sfx-exchange-rates/core/menus.php:3
    • > PHP Warning
      Use of undefined constant sfxexchangerates_plugin_id - assumed 'sfxexchangerates_plugin_id' (this will throw an Error in a future version of PHP) in wp-content/plugins/sfx-exchange-rates/core/configs.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/sfx-exchange-rates/views/admin/index.php:1
    • > PHP Warning
      Use of undefined constant sfxexchangerates_images_url - assumed 'sfxexchangerates_images_url' (this will throw an Error in a future version of PHP) in wp-content/plugins/sfx-exchange-rates/core/configs.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sfx-exchange-rates/widgets/sfxplugin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/sfx-exchange-rates/core/cons.php:4

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 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === sfx-exchange-rates === )
Please take inspiration from this readme.txt

sfx-exchange-rates/sfx-exchange-rates.php Passed 13 tests

"SFX Exchange rates" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
26 characters long description:
SFX Google Exchange rates.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin24,519 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript144,4382,81922,049
PHP196444732,289
CSS26611131
PO File1141550

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity83.60
▷ Minimum class complexity7.00
▷ Maximum class complexity249.00
Average method complexity5.05
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods102
▷ Static methods10.98%
▷ Public methods8785.29%
▷ Protected methods1514.71%
▷ Private methods00.00%
Functions30
▷ Named functions1860.00%
▷ Anonymous functions1240.00%
Constants48
▷ Global constants48100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
common/images/setting.png0.51KB0.43KB▼ 14.94%
common/images/icon.png0.32KB0.27KB▼ 15.74%
common/images/icon-black.png0.29KB0.27KB▼ 9.60%