84% mobika

Code Review | MOBIKA

WordPress plugin MOBIKA scored84%from 54 tests.

About plugin

  • Plugin page: mobika
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.3
  • WordPress version: 6.3.1
  • First release: Nov 21, 2019
  • Latest release: Dec 23, 2019
  • Number of updates: 25
  • Update frequency: every 1.3 days
  • Top authors: mobika (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /648 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.52ms] Passed 4 tests

Server-side resources used by MOBIKA
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.79 ▼0.65
Dashboard /wp-admin3.37 ▲0.0250.66 ▼15.22
Posts /wp-admin/edit.php3.48 ▲0.1252.30 ▲0.57
Add New Post /wp-admin/post-new.php5.95 ▲0.06102.04 ▼6.02
Media Library /wp-admin/upload.php3.29 ▲0.0637.01 ▼0.19

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 13 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
kasscloud_incoming_order_status
kasscloud_payment_gateway
can_compress_scripts
kasscloud_timeout
kasscloud_api_url
theysaidso_admin_options
kasscloud_delivery_vat
db_upgraded
...

Browser metrics Passed 4 tests

Checking browser requirements for MOBIKA
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.61 ▼0.691.57 ▼0.1340.56 ▼8.58
Dashboard /wp-admin2,220 ▲325.82 ▲0.9193.41 ▼18.2378.98 ▲38.08
Posts /wp-admin/edit.php2,100 ▲112.00 ▼0.0338.96 ▲3.9736.91 ▲1.53
Add New Post /wp-admin/post-new.php1,524 ▲523.22 ▲0.03661.27 ▲7.6057.08 ▲2.72
Media Library /wp-admin/upload.php1,396 ▲84.31 ▲0.13127.29 ▲31.7381.45 ▲40.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 13 options in the database
    • kasscloud_timeout
    • db_upgraded
    • kasscloud_api_url
    • can_compress_scripts
    • kasscloud_product_vat
    • widget_recent-comments
    • widget_recent-posts
    • kasscloud_payment_gateway
    • widget_theysaidso_widget
    • kasscloud_incoming_order_status
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Interface 'Mobika\\Api\\Sender' not found in wp-content/plugins/mobika/includes/sender.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mobika\\Api\\BaseClient' not found in wp-content/plugins/mobika/sdk/src/Api/OrderClient.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/mobika/kasscloud.php:14

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: ecommerce, woocommerce, woo commerce

mobika/kasscloud.php 92% from 13 tests

The main PHP file in "MOBIKA" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mobika.php" instead of "kasscloud.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected521 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP9658508
make1308
Markdown1305

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity7.86
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces3
Interfaces1
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes120.00%
Methods32
▷ Static methods26.25%
▷ Public methods3093.75%
▷ Protected methods13.12%
▷ Private methods13.12%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png0.37KB0.41KB0.00%