89% woo-paytalk-kopokopo-gateway

Code Review | KopoKopo Lipa Na Mpesa

WordPress plugin KopoKopo Lipa Na Mpesa scored89%from 54 tests.

About plugin

  • Plugin page: woo-paytalk-kopok...
  • Plugin version: 3.0.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.0
  • WordPress version: 6.3.1
  • First release: Sep 12, 2019
  • Latest release: Apr 23, 2023
  • Number of updates: 34
  • Update frequency: every 38.8 days
  • Top authors: abiudeko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /3,749 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.04MB] [CPU: ▼7.19ms] Passed 4 tests

An overview of server-side resources used by KopoKopo Lipa Na Mpesa
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.43 ▼4.08
Dashboard /wp-admin3.35 ▲0.0145.64 ▼8.05
Posts /wp-admin/edit.php3.41 ▲0.0542.84 ▼2.71
Add New Post /wp-admin/post-new.php5.94 ▲0.0580.97 ▼13.93
Media Library /wp-admin/upload.php3.28 ▲0.0536.70 ▲0.50

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

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

Browser metrics Passed 4 tests

A check of browser resources used by KopoKopo Lipa Na Mpesa
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲1014.35 ▼0.001.73 ▼0.2743.27 ▲0.17
Dashboard /wp-admin2,202 ▲225.62 ▼0.0697.98 ▼5.9042.41 ▼6.04
Posts /wp-admin/edit.php2,108 ▲51.99 ▲0.0433.82 ▼1.8434.64 ▲2.97
Add New Post /wp-admin/post-new.php1,533 ▼223.19 ▲5.00669.66 ▼4.2855.34 ▲1.41
Media Library /wp-admin/upload.php1,401 ▲44.21 ▲0.0296.95 ▼7.9241.48 ▼3.64

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

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: lipa na mpesa, paybill, paytalk, paytalkcoke, kopokopo stk push...

woo-paytalk-kopokopo-gateway/woo-paytalk-kopokopo-gateway.php 85% from 13 tests

The main PHP file in "KopoKopo Lipa Na Mpesa" ver. 3.0.5 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("3.7.6" instead of "3.0.0")
  • Description: Please don't use more than 140 characters for the plugin description (currently 289 characters long)

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 plugin266 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17256266

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity5.20
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/paytalk_160x68.png8.04KB3.02KB▼ 62.46%