84% lianlian-pay-for-woocommerce

Code Review | LianLian Pay Plugin for Woocommerce

WordPress plugin LianLian Pay Plugin for Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: lianlian-pay-for-...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Dec 25, 2020
  • Latest release: Aug 29, 2022
  • Number of updates: 24
  • Update frequency: every 25.5 days
  • Top authors: lianlianth (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,798 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by LianLian Pay Plugin for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.11 ▼3.23
Dashboard /wp-admin3.32 ▲0.0148.40 ▼0.84
Posts /wp-admin/edit.php3.37 ▲0.0149.49 ▼6.95
Add New Post /wp-admin/post-new.php5.90 ▲0.0199.57 ▼0.56
Media Library /wp-admin/upload.php3.24 ▲0.0140.45 ▲0.54

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for LianLian Pay Plugin for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.72 ▲0.191.92 ▼0.3443.94 ▼0.84
Dashboard /wp-admin2,195 ▲185.61 ▼0.0591.07 ▲1.6242.16 ▲3.22
Posts /wp-admin/edit.php2,100 ▲32.02 ▲0.0739.55 ▼1.9535.67 ▼3.46
Add New Post /wp-admin/post-new.php1,526 ▼223.59 ▲0.63675.72 ▲16.2151.80 ▼2.85
Media Library /wp-admin/upload.php1,403 ▲34.13 ▼0.10105.07 ▼5.1043.67 ▼1.62

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lianlian-pay-for-woocommerce/lianlian.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: paymentgateway, payment, woocommerce, sofortbanking, paysafecard...

lianlian-pay-for-woocommerce/lianlian.php 85% from 13 tests

The entry point to "LianLian Pay Plugin for Woocommerce" version 1.1.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("lianlian-pay-for-woocommerce.php" instead of "lianlian.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
There were no executable files found in this plugin741 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP7200278741

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity13.17
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods44
▷ Static methods12.27%
▷ Public methods2352.27%
▷ Protected methods1636.36%
▷ Private methods511.36%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin