73% trade-rates-realtime

Code Review | Forex Trade Rates Realtime Plugin-Widget

WordPress plugin Forex Trade Rates Realtime Plugin-Widget scored73%from 54 tests.

About plugin

  • Plugin page: trade-rates-realtime
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-5.5.1
  • WordPress version: 6.3.1
  • First release: Mar 23, 2017
  • Latest release: Sep 24, 2020
  • Number of updates: 17
  • Update frequency: every 75.2 days
  • Top authors: probook12 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,848 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.69MB] [CPU: ▼55.20ms] Passed 4 tests

Server-side resources used by Forex Trade Rates Realtime Plugin-Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.1511.07 ▼29.90
Dashboard /wp-admin2.32 ▼1.0211.05 ▼55.00
Posts /wp-admin/edit.php2.32 ▼1.0310.76 ▼40.20
Add New Post /wp-admin/post-new.php2.32 ▼3.5611.64 ▼95.69
Media Library /wp-admin/upload.php2.32 ▼0.909.27 ▼27.25

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Forex Trade Rates Realtime Plugin-Widget: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.412.06 ▲0.1244.95 ▲4.76
Dashboard /wp-admin2,203 ▲125.84 ▼0.06107.37 ▲6.7843.75 ▲5.38
Posts /wp-admin/edit.php2,092 ▼02.03 ▲0.0140.28 ▲1.9634.98 ▲2.28
Add New Post /wp-admin/post-new.php1,538 ▲2423.17 ▲5.68662.90 ▼25.3066.14 ▲12.04
Media Library /wp-admin/upload.php1,385 ▼34.24 ▲0.0599.38 ▼8.3444.40 ▼4.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wp_forex_rates::forex_rates_init() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/trade-rates-realtime/forex-rates-wp-widget.php:239

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
  • Screenshots: Screenshot #1 (This screenshot description corresponds to forex-rates-wp.gif.) image not found
The official readme.txt is a good inspiration

trade-rates-realtime/forex-rates-wp-widget.php 92% from 13 tests

"Forex Trade Rates Realtime Plugin-Widget" version 1.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("trade-rates-realtime.php" instead of "forex-rates-wp-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin206 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12213206

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin