89% paytalk-lipa-na-mpesa

Code Review | Paytalk Lipa Na Mpesa

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

About plugin

  • Plugin page: paytalk-lipa-na-m...
  • Plugin version: 3.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.0
  • WordPress version: 6.3.1
  • First release: Oct 1, 2018
  • Latest release: Aug 8, 2022
  • Number of updates: 33
  • Update frequency: every 42.6 days
  • Top authors: abiudeko (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /6,044 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼0.69ms] Passed 4 tests

A check of server-side resources used by Paytalk Lipa Na Mpesa
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.34 ▲5.86
Dashboard /wp-admin3.36 ▲0.0646.67 ▼3.44
Posts /wp-admin/edit.php3.41 ▲0.0648.32 ▲0.17
Add New Post /wp-admin/post-new.php5.94 ▲0.0692.28 ▲0.68
Media Library /wp-admin/upload.php3.29 ▲0.0632.67 ▼0.16

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Paytalk Lipa Na Mpesa: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲8614.47 ▲0.101.93 ▲0.1344.92 ▲7.93
Dashboard /wp-admin2,216 ▲254.81 ▼0.07102.34 ▼2.2240.75 ▼2.47
Posts /wp-admin/edit.php2,096 ▲42.03 ▲0.0440.20 ▼1.7335.48 ▼4.22
Add New Post /wp-admin/post-new.php1,549 ▲2918.40 ▼4.86614.12 ▼6.5058.28 ▲9.98
Media Library /wp-admin/upload.php1,392 ▲134.22 ▼0.0997.04 ▼4.3142.78 ▼2.72

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: lipa na mpesa, till number, mpesa integration, mpesa, paytalkcoke...

paytalk-lipa-na-mpesa/woo-paytalk-lipa-na-mpesa.php 77% from 13 tests

The main PHP script in "Paytalk Lipa Na Mpesa" version 3.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Requires at least: Required version must match the one declared in readme.txt ("3.7.6" instead of "3.0.0")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("paytalk-lipa-na-mpesa.php" instead of "woo-paytalk-lipa-na-mpesa.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected353 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16868353

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity8.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.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

PNG files should be compressed to save space and minimize bandwidth usage
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%