90% payjustnow-for-woocommerce

Code Review | PayJustNow for WooCommerce

WordPress plugin PayJustNow for WooCommerce scored 90% from 54 tests.

About plugin

  • Plugin page: payjustnow-for-wo...
  • Plugin version: 2.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 20, 2019
  • Latest release: Jan 27, 2023
  • Number of updates: 17
  • Update frequency: every 74.7 days
  • Top authors: pjnplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active / 5,070 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▲1.71ms] Passed 4 tests

An overview of server-side resources used by PayJustNow for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0346.38 ▲4.74
Dashboard /wp-admin3.34 ▲0.0356.50 ▲4.39
Posts /wp-admin/edit.php3.39 ▲0.0353.08 ▼0.78
Add New Post /wp-admin/post-new.php5.92 ▲0.0398.58 ▲2.09
Media Library /wp-admin/upload.php3.26 ▲0.0337.78 ▲1.15

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

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

Browser metrics Passed 4 tests

A check of browser resources used by PayJustNow for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▼013.13 ▼1.271.85 ▼0.0744.34 ▼0.37
Dashboard /wp-admin2,206 ▼35.80 ▼0.1296.71 ▼14.2740.24 ▼5.10
Posts /wp-admin/edit.php2,092 ▼02.02 ▼0.0239.68 ▼1.1234.98 ▼3.33
Add New Post /wp-admin/post-new.php1,536 ▲1723.32 ▲0.08650.71 ▲21.4147.95 ▼15.92
Media Library /wp-admin/upload.php1,382 ▼64.18 ▼0.0595.39 ▼12.5743.22 ▼1.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: payjustnow, woocommerce, south african payment gateway

payjustnow-for-woocommerce/woocommerce-gateway-payjustnow.php 92% from 13 tests

"PayJustNow for WooCommerce" version 2.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("payjustnow-for-woocommerce.php" instead of "woocommerce-gateway-payjustnow.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,010 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2167102706
CSS210543303
JavaScript1181

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity50.00
▷ Minimum class complexity50.00
▷ Maximum class complexity50.00
Average method complexity6.44
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
8 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/payjustnow_logo_dark_theme.png5.14KB3.37KB▼ 34.39%
assets/images/tickbox.png0.80KB0.46KB▼ 42.84%
assets/images/VectorStep4.png1.57KB0.74KB▼ 52.82%
assets/images/VectorTick.png0.27KB0.22KB▼ 18.35%
assets/images/VectorStep1.png2.36KB1.03KB▼ 56.30%