84% pmpro-multiple-currencies

Code Review | Multiple Currencies for Paid Memberships Pro

WordPress plugin Multiple Currencies for Paid Memberships Pro scored84%from 54 tests.

About plugin

  • Plugin page: pmpro-multiple-cu...
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7.1
  • WordPress version: 6.3.1
  • First release: May 14, 2021
  • Latest release: Mar 17, 2022
  • Number of updates: 13
  • Update frequency: every 23.7 days
  • Top authors: louiswol94 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,043 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.74ms] Passed 4 tests

This is a short check of server-side resources used by Multiple Currencies for Paid Memberships Pro
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.04 ▲1.76
Dashboard /wp-admin3.33 ▲0.0351.84 ▼0.06
Posts /wp-admin/edit.php3.39 ▲0.0348.48 ▼6.22
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.52 ▼31.29
Media Library /wp-admin/upload.php3.26 ▲0.0336.20 ▼1.37

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Multiple Currencies for Paid Memberships Pro
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.101.75 ▼0.2443.34 ▼0.72
Dashboard /wp-admin2,198 ▲245.61 ▲0.0288.13 ▼5.7440.74 ▲0.36
Posts /wp-admin/edit.php2,103 ▼01.97 ▼0.0335.19 ▼6.8533.36 ▼4.22
Add New Post /wp-admin/post-new.php1,535 ▲918.17 ▼4.91616.63 ▼27.9069.36 ▲5.55
Media Library /wp-admin/upload.php1,391 ▼94.16 ▲0.04102.61 ▼9.8742.13 ▼8.85

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmpro-multiple-currencies/pmpro-multiple-currencies.php:72

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 Passed 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
2 plugin tags: pmpro, currency

pmpro-multiple-currencies/pmpro-multiple-currencies.php Passed 13 tests

Analyzing the main PHP file in "Multiple Currencies for Paid Memberships Pro" version 0.0.2
58 characters long description:
Change currencies depending on Paid Memberships Pro level.

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
No dangerous file extensions were detected113 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13115113

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin