84% pm-currency-for-wp

Code Review | PM Currency For WP

WordPress plugin PM Currency For WP scored84%from 54 tests.

About plugin

  • Plugin page: pm-currency-for-wp
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 1, 2022
  • Latest release: Jan 1, 2022
  • Number of updates: 4
  • Update frequency: every 33.3 days
  • Top authors: pluginsdotmonster (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /617 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▲38.41ms] Passed 4 tests

Server-side resources used by PM Currency For WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.03191.72 ▲147.37
Dashboard /wp-admin3.31 ▲0.0145.45 ▼3.43
Posts /wp-admin/edit.php3.36 ▲0.0148.71 ▲2.08
Add New Post /wp-admin/post-new.php5.91 ▲0.02307.53 ▲214.12
Media Library /wp-admin/upload.php3.23 ▲0.0142.38 ▲7.61

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: 1 new table, 6 new options
New tables
wp_wpcurrencybypluginsmonster
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for PM Currency For WP
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9513.57 ▼0.831.85 ▼0.1437.34 ▼7.47
Dashboard /wp-admin2,221 ▲295.86 ▲0.9494.36 ▼17.1681.49 ▲36.64
Posts /wp-admin/edit.php2,104 ▲151.99 ▼0.0337.49 ▲0.5337.96 ▲5.42
Add New Post /wp-admin/post-new.php1,681 ▲14822.51 ▼0.72727.77 ▲49.3958.18 ▼0.61
Media Library /wp-admin/upload.php1,406 ▲184.25 ▲0.03100.60 ▲2.9166.30 ▲22.25

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 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pm-currency-for-wp/pmcurrencyforwp.php:30

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: visitor currency, currency conversion, currency converter, currency

pm-currency-for-wp/pmcurrencyforwp.php 92% from 13 tests

The main PHP file in "PM Currency For WP" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("pm-currency-for-wp.php" instead of "pmcurrencyforwp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin116 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13622116

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.18MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wpcurrencyprobanner.png73.43KB23.82KB▼ 67.56%
wpcurrencytopbanner.png69.57KB21.85KB▼ 68.60%
slogo.PNG17.98KB7.36KB▼ 59.06%
logo.png26.75KB9.00KB▼ 66.33%
pmcurrencyforwpicon.png1.64KB0.53KB▼ 67.70%