84% pm-currency-for-wc

Code Review | PM Currency For WooCommerce

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

About plugin

  • Plugin page: pm-currency-for-wc
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 18, 2021
  • Latest release: Aug 20, 2021
  • Number of updates: 7
  • Update frequency: every 2.1 days
  • Top authors: pluginsdotmonster (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /300 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.04MB] [CPU: ▲21.34ms] Passed 4 tests

This is a short check of server-side resources used by PM Currency For WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.11149.71 ▲101.26
Dashboard /wp-admin3.34 ▲0.0448.32 ▼8.59
Posts /wp-admin/edit.php3.39 ▲0.0348.76 ▼2.21
Add New Post /wp-admin/post-new.php5.93 ▲0.05300.26 ▲207.66
Media Library /wp-admin/upload.php3.26 ▲0.0333.01 ▼5.12

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: 1 new table, 6 new options
New tables
wp_woocurrencybypluginsmonster
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for PM Currency For WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲814.17 ▼0.551.81 ▼0.3642.18 ▼1.02
Dashboard /wp-admin2,210 ▲395.52 ▼0.0686.88 ▼6.9767.32 ▲24.78
Posts /wp-admin/edit.php2,118 ▲212.01 ▼0.0135.22 ▼0.9733.46 ▼4.67
Add New Post /wp-admin/post-new.php1,554 ▲2623.08 ▲0.10651.34 ▼21.62153.65 ▲87.34
Media Library /wp-admin/upload.php1,415 ▲154.22 ▲0.0596.14 ▼22.0674.25 ▲25.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

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× 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/pm-currency-for-wc/pmcurrencyforwc.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)
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: You can look at the official readme.txt

pm-currency-for-wc/pmcurrencyforwc.php 92% from 13 tests

"PM Currency For WooCommerce" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pm-currency-for-wc.php" instead of "pmcurrencyforwc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin150 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14423150

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
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%
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

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.19MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
logo.png28.13KB9.19KB▼ 67.31%
woocurrencyprobanner.png73.80KB23.81KB▼ 67.73%
slogo.PNG19.00KB7.86KB▼ 58.64%
pmcurrencyforwcicon.png1.64KB0.53KB▼ 67.70%
woocurrencytopbanner.png71.74KB22.80KB▼ 68.22%