89% payflexi-checkout-for-woocommerce

Code Review | PayFlexi Checkout for WooCommerce

WordPress plugin PayFlexi Checkout for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: payflexi-checkout...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Mar 8, 2022
  • Latest release: May 17, 2022
  • Number of updates: 4
  • Update frequency: every 18.7 days
  • Top authors: payflexi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /344 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by PayFlexi Checkout for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0135.06 ▼6.54
Dashboard /wp-admin3.31 ▼0.0350.18 ▼13.32
Posts /wp-admin/edit.php3.36 ▲0.0148.71 ▼2.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.42 ▼13.65
Media Library /wp-admin/upload.php3.23 ▲0.0136.64 ▼0.55

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

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

Browser metrics Passed 4 tests

Checking browser requirements for PayFlexi Checkout for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲5014.21 ▼0.071.75 ▲0.0336.62 ▼7.45
Dashboard /wp-admin2,205 ▲285.57 ▲0.0493.44 ▼3.6541.88 ▼2.28
Posts /wp-admin/edit.php2,107 ▲41.99 ▲0.0339.41 ▼2.2035.74 ▼1.17
Add New Post /wp-admin/post-new.php1,535 ▲723.07 ▲0.02616.93 ▼66.8254.54 ▲3.11
Media Library /wp-admin/upload.php1,407 ▲104.21 ▲0.0196.13 ▼11.8842.51 ▼0.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

payflexi-checkout-for-woocommerce/init.php 85% from 13 tests

The entry point to "PayFlexi Checkout for WooCommerce" version 1.1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7" instead of "3.8.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("payflexi-checkout-for-woocommerce.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected904 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6155239557
CSS1234238
JavaScript2221109

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity17.75
▷ Minimum class complexity3.00
▷ Maximum class complexity31.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods12.86%
▷ Public methods3291.43%
▷ Protected methods00.00%
▷ Private methods38.57%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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.12MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo-icon-primary.png44.32KB12.00KB▼ 72.94%
assets/images/logo-icon-white.png35.93KB12.00KB▼ 66.61%
assets/images/payflexi-logo-light.png6.76KB3.76KB▼ 44.32%
assets/images/payflexi-wc.png7.35KB3.01KB▼ 59.12%
assets/images/logo-dark@2x.png24.30KB7.07KB▼ 70.89%