84% smartpaylive

Code Review | SmartPayLive

WordPress plugin SmartPayLive scored84%from 54 tests.

About plugin

  • Plugin page: smartpaylive
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 30, 2021
  • Latest release: Jul 1, 2021
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: overflowdevelopment (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /312 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.00ms] Passed 4 tests

Analyzing server-side resources used by SmartPayLive
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.14 ▼2.58
Dashboard /wp-admin3.31 ▲0.0049.60 ▼1.35
Posts /wp-admin/edit.php3.36 ▲0.0046.55 ▼7.64
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.80 ▼16.41
Media Library /wp-admin/upload.php3.23 ▲0.0038.22 ▲2.94

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

SmartPayLive: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2913.74 ▼0.651.93 ▼0.5545.74 ▼3.80
Dashboard /wp-admin2,218 ▲125.80 ▲0.72101.41 ▼0.4936.03 ▼7.55
Posts /wp-admin/edit.php2,100 ▼62.00 ▼0.0535.25 ▼9.3133.53 ▼1.56
Add New Post /wp-admin/post-new.php1,545 ▼023.24 ▲0.25694.91 ▲20.1256.11 ▲9.99
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0597.73 ▼19.5341.92 ▼4.05

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/smartpaylive/includes/class-wc-gateway-smartpaylive.php:10

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: woocommerce, internet banking, south africa, smartpaylive, payment request...

smartpaylive/smartpaylive.php Passed 13 tests

This is the main PHP file of "SmartPayLive" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
104 characters long description:
A World-Class, Innovative, Direct Merchanting Bank to Bank Instant EFT Payment Solution in South Africa.

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
Everything looks great! No dangerous files found in this plugin373 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP347164373

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity17.50
▷ Minimum class complexity8.00
▷ Maximum class complexity27.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods1242.86%
▷ Protected methods00.00%
▷ Private methods1657.14%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png13.74KB7.55KB▼ 45.04%