89% integrate-fonepay-in-woocommerce

Code Review | Integrate Fonepay in WooCommerce

WordPress plugin Integrate Fonepay in WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: integrate-fonepay...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 7, 2020
  • Latest release: Aug 10, 2023
  • Number of updates: 14
  • Update frequency: every 76.4 days
  • Top authors: act360 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,245 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 gracefully, with no errors

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

A check of server-side resources used by Integrate Fonepay in WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.81 ▼1.45
Dashboard /wp-admin3.31 ▲0.0150.72 ▼0.40
Posts /wp-admin/edit.php3.36 ▲0.0048.67 ▼4.80
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.12 ▼32.51
Media Library /wp-admin/upload.php3.23 ▲0.0037.94 ▲0.49

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Integrate Fonepay in WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲10813.58 ▼0.804.72 ▲3.0443.02 ▲1.86
Dashboard /wp-admin2,235 ▲324.86 ▼1.00110.86 ▲6.7540.57 ▼3.02
Posts /wp-admin/edit.php2,114 ▲142.04 ▲0.0442.16 ▲0.3335.36 ▼1.59
Add New Post /wp-admin/post-new.php1,554 ▲923.37 ▲0.16673.93 ▲17.2860.47 ▼4.51
Media Library /wp-admin/upload.php1,414 ▲144.23 ▼0.01100.89 ▼17.9844.38 ▼6.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

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

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: payment gateway, fonepay, woocommerce

integrate-fonepay-in-woocommerce/woocommerce-fonepay.php 77% from 13 tests

The principal PHP file in "Integrate Fonepay in WooCommerce" v. 1.1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "4.3.0")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("integrate-fonepay-in-woocommerce.php" instead of "woocommerce-fonepay.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin490 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8115302460
JavaScript25630

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.32
Average class complexity9.40
▷ Minimum class complexity3.00
▷ Maximum class complexity17.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes125.00%
Methods32
▷ Static methods26.25%
▷ Public methods2062.50%
▷ Protected methods1031.25%
▷ Private methods26.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/fonepay.png2.97KB2.06KB▼ 30.75%
assets/images/fonepay-big.png11.67KB6.81KB▼ 41.62%