90% foloosi-for-woocommerce

Code Review | Foloosi Payments

WordPress plugin Foloosi Payments scored90%from 54 tests.

About plugin

  • Plugin page: foloosi-for-wooco...
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-6.0.3
  • WordPress version: 6.3.1
  • First release: Jun 20, 2019
  • Latest release: Apr 10, 2023
  • Number of updates: 26
  • Update frequency: every 53.5 days
  • Top authors: foloosi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /3,520 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.11ms] Passed 4 tests

This is a short check of server-side resources used by Foloosi Payments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.89 ▲0.51
Dashboard /wp-admin3.31 ▲0.0162.67 ▲8.48
Posts /wp-admin/edit.php3.42 ▲0.0754.31 ▲4.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.11 ▼11.33
Media Library /wp-admin/upload.php3.23 ▲0.0039.23 ▲1.56

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Foloosi Payments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.45 ▲0.101.73 ▲0.0244.30 ▲1.06
Dashboard /wp-admin2,192 ▲155.65 ▼0.0195.39 ▲1.8543.18 ▲2.48
Posts /wp-admin/edit.php2,100 ▼32.00 ▼0.0233.71 ▼4.0335.70 ▼4.29
Add New Post /wp-admin/post-new.php1,526 ▼023.54 ▲0.32670.80 ▲0.9159.94 ▲7.89
Media Library /wp-admin/upload.php1,403 ▼04.21 ▼0.0598.45 ▼4.4144.54 ▼0.50

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: payments, foloosi, uae, card

foloosi-for-woocommerce/foloosi-payments.php 92% from 13 tests

The main PHP script in "Foloosi Payments" version 1.2.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("foloosi-for-woocommerce.php" instead of "foloosi-payments.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected583 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13896549
JavaScript10034

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1356.52%
▷ Protected methods730.43%
▷ Private methods313.04%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.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
No PNG files were detected