89% starpay-wpp

Code Review | StarPay-WPP Plugin

WordPress plugin StarPay-WPP Plugin scored89%from 54 tests.

About plugin

  • Plugin page: starpay-wpp
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.8
  • WordPress version: 6.3.1
  • First release: Jul 15, 2021
  • Latest release: Jul 19, 2021
  • Number of updates: 8
  • Update frequency: every 0.6 days
  • Top authors: netstats123 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /319 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.64MB] [CPU: ▼22.50ms] Passed 4 tests

An overview of server-side resources used by StarPay-WPP Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.82 ▼3.45
Dashboard /wp-admin3.36 ▲0.0151.87 ▼17.67
Posts /wp-admin/edit.php3.41 ▲0.0549.82 ▼2.92
Add New Post /wp-admin/post-new.php3.23 ▼2.6640.65 ▼65.94
Media Library /wp-admin/upload.php3.28 ▲0.0540.08 ▲2.04
Apply /wp-admin/admin.php?page=starpayapply3.2534.96
StarPay-WPP /wp-admin/admin.php?page=starpayconfig3.2532.72
About Us /wp-admin/admin.php?page=starpayaboutus3.2534.33

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

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

Browser metrics Passed 4 tests

StarPay-WPP Plugin: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲15613.89 ▼0.4110.23 ▲8.0643.57 ▲0.71
Dashboard /wp-admin2,222 ▲545.63 ▲0.0783.47 ▼14.5039.87 ▼0.05
Posts /wp-admin/edit.php2,126 ▲261.90 ▼0.1432.86 ▼2.1234.07 ▼5.16
Add New Post /wp-admin/post-new.php1,552 ▲2123.41 ▼0.06690.93 ▲16.2459.41 ▲6.09
Media Library /wp-admin/upload.php1,427 ▲274.24 ▼0.0296.45 ▼12.8141.11 ▼7.49
Apply /wp-admin/admin.php?page=starpayapply8002.0523.9643.62
StarPay-WPP /wp-admin/admin.php?page=starpayconfig8082.0524.2929.42
About Us /wp-admin/admin.php?page=starpayaboutus8672.1627.2727.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • 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)
Good news, no errors were detected

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
Congratulations! This plugin passed the SRP test

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt is a good inspiration

starpay-wpp/wc-starpay-main.php 85% from 13 tests

The principal PHP file in "StarPay-WPP Plugin" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("starpay-wpp.php" instead of "wc-starpay-main.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
Good job! No executable or dangerous file extensions detected1,106 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31421531,078
JavaScript10028

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity112.00
▷ Minimum class complexity112.00
▷ Maximum class complexity112.00
Average method complexity7.17
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
11 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/alipay_logo.png5.76KB2.94KB▼ 48.93%
images/merpay_logo.png2.07KB1.62KB▼ 21.87%
images/linepay_logo.png2.08KB1.34KB▼ 35.62%
images/Wechat_logo.png3.74KB2.23KB▼ 40.22%
images/unionpay_logo.png4.70KB2.54KB▼ 45.98%