89% woo-astropay-card-payment

Code Review | Simple Intelligent Systems AstroPay Card Payment option for Woocommerce

WordPress plugin Simple Intelligent Systems AstroPay Card Payment option for Woocommerce scored89%from 54 tests.

About plugin

  • Plugin page: woo-astropay-card...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Mar 24, 2020
  • Latest release: Nov 1, 2021
  • Number of updates: 26
  • Update frequency: every 26.4 days
  • Top authors: SimpleIntelligentSystems (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /648 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.10ms] Passed 4 tests

Analyzing server-side resources used by Simple Intelligent Systems AstroPay Card Payment option for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0835.76 ▼3.74
Dashboard /wp-admin3.39 ▲0.0843.73 ▼4.67
Posts /wp-admin/edit.php3.50 ▲0.1443.47 ▲1.85
Add New Post /wp-admin/post-new.php5.97 ▲0.0890.77 ▼9.83
Media Library /wp-admin/upload.php3.31 ▲0.0836.28 ▲5.96

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Simple Intelligent Systems AstroPay Card Payment option for Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.33 ▼1.325.15 ▲3.4639.79 ▼2.85
Dashboard /wp-admin2,209 ▲214.86 ▲0.03101.93 ▼16.7241.17 ▼9.96
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0336.74 ▼6.6833.32 ▼8.07
Add New Post /wp-admin/post-new.php1,544 ▲218.54 ▲0.12626.86 ▼8.4950.66 ▼6.28
Media Library /wp-admin/upload.php1,391 ▼04.20 ▼0.1197.18 ▼4.4342.64 ▼0.09

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Requires php: Invalid version format
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

woo-astropay-card-payment/woo-astropay-card-payment.php 92% from 13 tests

The primary PHP file in "Simple Intelligent Systems AstroPay Card Payment option for Woocommerce" version 1.0.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.4" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected427 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP39537427

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity13.67
▷ Minimum class complexity4.00
▷ Maximum class complexity25.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods312.00%
▷ Public methods2184.00%
▷ Protected methods416.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/apc-logo-blanyorjo.png6.52KB3.92KB▼ 39.88%
images/Logo-APC-Transparente.png5.92KB3.94KB▼ 33.49%