89% myanmar-currency-exchange-rates

Code Review | Myanmar Currency Exchange Rates

WordPress plugin Myanmar Currency Exchange Rates scored89%from 54 tests.

About plugin

  • Plugin page: myanmar-currency-...
  • Plugin version: 2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7.0+
  • WordPress version: 6.3.1
  • First release: Nov 25, 2020
  • Latest release: Jun 27, 2022
  • Number of updates: 8
  • Update frequency: every 72.4 days
  • Top authors: myanmarwd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,866 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼7.17ms] 75% from 4 tests

Analyzing server-side resources used by Myanmar Currency Exchange Rates
The following require your attention
  • CPU: You should keep total CPU usage under 500.00ms (currently 2,238.06ms on /wp-admin/options-general.php?page=mwd_mcer)
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1334.47 ▼7.56
Dashboard /wp-admin3.44 ▲0.0943.78 ▼21.14
Posts /wp-admin/edit.php3.55 ▲0.1948.09 ▲1.86
Add New Post /wp-admin/post-new.php6.04 ▲0.1591.58 ▼1.83
Media Library /wp-admin/upload.php3.36 ▲0.1334.38 ▲2.31
Myanmar Currency Exchange Rates /wp-admin/options-general.php?page=mwd_mcer3.362,238.06

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_mfr
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Myanmar Currency Exchange Rates
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.54 ▼0.811.75 ▼0.6339.39 ▼2.35
Dashboard /wp-admin2,212 ▲244.87 ▼1.15108.05 ▲1.9638.85 ▼4.96
Posts /wp-admin/edit.php2,095 ▲62.00 ▲0.0041.41 ▲3.8034.75 ▼0.71
Add New Post /wp-admin/post-new.php1,542 ▼018.59 ▲0.15605.82 ▼15.5354.27 ▲2.11
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.1592.42 ▼7.0640.95 ▼3.84
Myanmar Currency Exchange Rates /wp-admin/options-general.php?page=mwd_mcer1,1321.8226.2536.27

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 93% 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:
  • Tested up to: Invalid version format
You can take inspiration from this readme.txt

myanmar-currency-exchange-rates/myanmar-exchange-rates.php 92% from 13 tests

The main PHP file in "Myanmar Currency Exchange Rates" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("myanmar-currency-exchange-rates.php" instead of "myanmar-exchange-rates.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin754 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8185679681
Markdown115044
JavaScript15329

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.83
▷ Minimum class complexity3.00
▷ Maximum class complexity30.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods41
▷ Static methods24.88%
▷ Public methods3585.37%
▷ Protected methods00.00%
▷ Private methods614.63%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin