73% magnipos

Code Review | MagniPOS - POS Software for WooCommerce

WordPress plugin MagniPOS - POS Software for WooCommerce scored 73% from 54 tests.

About plugin

  • Plugin page: magnipos
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 5, 2023
  • Latest release: Sep 18, 2023
  • Number of updates: 5
  • Update frequency: every 21.8 days
  • Top authors: Magnigenie (60%)sagarseth9 (60%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 157 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.14MB] [CPU: ▼12.96ms] Passed 4 tests

This is a short check of server-side resources used by MagniPOS - POS Software for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5340.95 ▼5.17
Dashboard /wp-admin3.83 ▲0.5351.84 ▲3.03
Posts /wp-admin/edit.php3.88 ▲0.5350.69 ▲5.42
Add New Post /wp-admin/post-new.php3.73 ▼2.1638.52 ▼55.13
Media Library /wp-admin/upload.php3.75 ▲0.5340.35 ▲7.26

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 50 new files
Database: 1 new table, 7 new options
New tables
wp_mp_customer_balance
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
recovery_mode_email_last_sent
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by MagniPOS - POS Software for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲15213.23 ▼1.361.68 ▼0.2036.33 ▼10.48
Dashboard /wp-admin2,286 ▲985.84 ▲0.0398.29 ▼31.5041.95 ▼28.85
Posts /wp-admin/edit.php2,174 ▲1062.02 ▲0.0439.19 ▲3.1440.57 ▲7.25
Add New Post /wp-admin/post-new.php53 ▼1,4800.44 ▼22.730.11 ▼653.4314.85 ▼53.55
Media Library /wp-admin/upload.php1,469 ▲784.18 ▼0.0394.26 ▼3.3565.91 ▲24.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_mp_customer_balance
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/magnipos/admin/templates/magni-pos-admin-dashboard.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #1, #10, #11, #12, #13, #14, #2, #3, #4, #5, #6, #7, #8, #9 in magnipos/assets to your readme.txt
The official readme.txt is a good inspiration

magnipos/magni-pos.php 85% from 13 tests

The entry point to "MagniPOS - POS Software for WooCommerce" version 1.0.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("magnipos.php" instead of "magni-pos.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected5,600 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP411,1642,6125,054
CSS13912283
Markdown1320168
JSON20095

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity19.55
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes31
▷ Abstract classes00.00%
▷ Concrete classes31100.00%
▷ Final classes00.00%
Methods216
▷ Static methods5425.00%
▷ Public methods18485.19%
▷ Protected methods104.63%
▷ Private methods2210.19%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin