84% saphali-liqpay-for-donate

Code Review | Saphali LiqPay for donate

WordPress plugin Saphali LiqPay for donate scored84%from 54 tests.

About plugin

  • Plugin page: saphali-liqpay-fo...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 25, 2015
  • Latest release: Aug 18, 2017
  • Number of updates: 13
  • Update frequency: every 58.4 days
  • Top authors: Saphali (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,609 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.06MB] [CPU: ▲1.22ms] Passed 4 tests

Server-side resources used by Saphali LiqPay for donate
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0642.84 ▲1.24
Dashboard /wp-admin3.36 ▲0.0656.37 ▲3.87
Posts /wp-admin/edit.php3.48 ▲0.1254.93 ▲1.67
Add New Post /wp-admin/post-new.php5.95 ▲0.0698.86 ▼1.90
Media Library /wp-admin/upload.php3.29 ▲0.0639.88 ▲4.60

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Saphali LiqPay for donate
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲4914.35 ▲0.231.63 ▼0.2444.24 ▼0.43
Dashboard /wp-admin2,216 ▲365.68 ▼0.0084.66 ▼6.2077.84 ▲29.06
Posts /wp-admin/edit.php2,121 ▲212.01 ▼0.0238.90 ▼0.1935.29 ▼1.21
Add New Post /wp-admin/post-new.php1,556 ▲3023.33 ▼0.23672.25 ▼56.3263.46 ▼5.17
Media Library /wp-admin/upload.php1,415 ▲184.20 ▼0.02109.12 ▼3.8570.53 ▲21.40

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/saphali-liqpay-for-donate/liqpay-d.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Requires at least: Version format is invalid
You can look at the official readme.txt

saphali-liqpay-for-donate/liqpay-d.php 92% from 13 tests

This is the main PHP file of "Saphali LiqPay for donate" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("saphali-liqpay-for-donate.php" instead of "liqpay-d.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin287 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24482220
PO File1141450
JavaScript12017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity15.50
▷ Minimum class complexity12.00
▷ Maximum class complexity19.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/order_form.png1.59KB0.94KB▼ 41.06%
images/menu_icons.png1.64KB1.07KB▼ 34.86%