89% rr-fictitious-payment-for-woocommerce

Code Review | RR Fictitious Payment for WooCommerce

WordPress plugin RR Fictitious Payment for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: rr-fictitious-pay...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 16, 2019
  • Latest release: Oct 11, 2023
  • Number of updates: 50
  • Update frequency: every 34.6 days
  • Top authors: reskatorfr (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /2,793 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.89ms] Passed 4 tests

Analyzing server-side resources used by RR Fictitious Payment for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.54 ▼3.81
Dashboard /wp-admin3.31 ▲0.0047.29 ▼6.99
Posts /wp-admin/edit.php3.36 ▲0.0050.63 ▼0.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.70 ▼11.92
Media Library /wp-admin/upload.php3.23 ▲0.0038.86 ▲4.06

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

RR Fictitious Payment for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.18 ▼0.101.60 ▼0.2542.04 ▼1.68
Dashboard /wp-admin2,195 ▲155.52 ▼0.1085.62 ▼4.1438.23 ▼3.39
Posts /wp-admin/edit.php2,103 ▲31.97 ▲0.0238.71 ▲1.6634.80 ▼1.86
Add New Post /wp-admin/post-new.php1,526 ▼222.94 ▼0.09664.03 ▼19.9852.03 ▼2.69
Media Library /wp-admin/upload.php1,400 ▲34.20 ▼0.1297.12 ▼6.5540.58 ▼8.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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
You can take inspiration from this readme.txt

rr-fictitious-payment-for-woocommerce/rr-fictitious-payment-for-woocommerce.php 92% from 13 tests

The primary PHP file in "RR Fictitious Payment for WooCommerce" version 1.2.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.4" instead of "2.1.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin230 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP337160127
PO File13052103

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/fictitious-payment.png0.77KB0.48KB▼ 37.12%