10% exchange-rate-table

Code Review | Exchange Rate Table

WordPress plugin Exchange Rate Table scored10%from 54 tests.

About plugin

  • Plugin page: exchange-rate-table
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.2
  • WordPress version: 6.3.1
  • First release: Feb 23, 2010
  • Latest release: May 16, 2023
  • Number of updates: 70
  • Update frequency: every 69.0 days
  • Top authors: enclick (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /28,431 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/exchange-rate-table/exchange-rate-table.php+39
    Methods with the same name as their class will not be constructors in a future version of PHP; exchange_rate_table has a deprecated constructor

Server metrics [RAM: ▼1.88MB] [CPU: ▼57.57ms] Passed 4 tests

Analyzing server-side resources used by Exchange Rate Table
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.365.09 ▼35.26
Dashboard /wp-admin2.13 ▼1.186.15 ▼48.04
Posts /wp-admin/edit.php2.13 ▼1.237.43 ▼50.89
Add New Post /wp-admin/post-new.php2.13 ▼3.767.89 ▼96.10
Media Library /wp-admin/upload.php2.13 ▼1.105.95 ▼29.74

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Exchange Rate Table
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.161.87 ▲0.0643.07 ▼4.82
Dashboard /wp-admin2,209 ▲304.87 ▼0.03109.49 ▼1.7441.94 ▼9.25
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0439.61 ▲2.9034.33 ▼5.83
Add New Post /wp-admin/post-new.php1,533 ▲1923.13 ▲5.60663.45 ▼32.9259.79 ▲1.87
Media Library /wp-admin/upload.php1,391 ▲94.28 ▲0.10105.73 ▲7.1047.77 ▼1.82

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/exchange-rate-table/exchange-rate-table.php+39
    Methods with the same name as their class will not be constructors in a future version of PHP; exchange_rate_table has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_exchange_rate_table

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/exchange-rate-table/exchange-rate-table.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Short table for the Japanese Yen with codes), #2 (Short table for the Dollar with countries), #3 (Short table for the Euro with currency names), #4 (Admin panel), #5 (Medium for the Euro with country names), #6 (Medium size table for the HK Dollar with countries)
The official readme.txt is a good inspiration

exchange-rate-table/exchange-rate-table.php Passed 13 tests

The main PHP file in "Exchange Rate Table" ver. 1.4 adds more information about the plugin and also serves as the entry point for this plugin
127 characters long description:
Exchange Rate Table for any currency in the world. Choose the currency to display, header colors and the table size and format.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin270 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP212081270

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
250 compressed PNG files occupy 0.13MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
countries/th.png0.44KB0.67KB0.00%
countries/tv.png0.52KB0.66KB0.00%
countries/ba.png0.58KB0.71KB0.00%
countries/om.png0.47KB0.64KB0.00%
countries/mw.png0.52KB0.68KB0.00%