90% mobipaid

Code Review | Mobipaid

WordPress plugin Mobipaid scored90%from 54 tests.

About plugin

  • Plugin page: mobipaid
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Apr 6, 2020
  • Latest release: Sep 7, 2023
  • Number of updates: 34
  • Update frequency: every 36.8 days
  • Top authors: mobipaid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,698 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.66MB] [CPU: ▼18.04ms] Passed 4 tests

Server-side resources used by Mobipaid
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.57 ▼3.90
Dashboard /wp-admin3.32 ▲0.0245.05 ▼5.17
Posts /wp-admin/edit.php3.37 ▲0.0247.99 ▲0.01
Add New Post /wp-admin/post-new.php3.20 ▼2.6934.88 ▼63.08
Media Library /wp-admin/upload.php3.24 ▲0.0234.77 ▲2.72

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
mobipaid_plugin_version
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Mobipaid
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.72 ▲0.511.55 ▼0.6139.60 ▼4.17
Dashboard /wp-admin2,195 ▲175.63 ▲0.0591.86 ▼9.1637.08 ▼8.52
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0541.92 ▼0.0635.52 ▼0.13
Add New Post /wp-admin/post-new.php1,535 ▼318.19 ▼4.53618.48 ▼43.9366.07 ▲14.70
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.2196.14 ▼15.1143.40 ▼4.35

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
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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: 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 shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: apple pay, payment method, nedbank, credit card, google pay...

mobipaid/mobipaid.php Passed 13 tests

"Mobipaid" version 1.0.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
32 characters long description:
Receive payments using Mobipaid.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,995 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PO File183603601,229
PHP5163352766

PHP code Passed 2 tests

Analyzing 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.32
Average class complexity51.50
▷ Minimum class complexity6.00
▷ Maximum class complexity97.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods37
▷ Static methods1027.03%
▷ Public methods2978.38%
▷ Protected methods821.62%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/mp-logo.png0.47KB0.33KB▼ 28.81%