83% posnet-printer-for-woocommerce

Code Review | Posnet Printer Integration Plugin

WordPress plugin Posnet Printer Integration Plugin scored83%from 54 tests.

About plugin

  • Plugin page: posnet-printer-fo...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.8
  • WordPress version: 6.3.1
  • First release: Nov 1, 2019
  • Latest release: Nov 10, 2021
  • Number of updates: 9
  • Update frequency: every 82.3 days
  • Top authors: bigdotsoftware (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /696 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.37ms] Passed 4 tests

A check of server-side resources used by Posnet Printer Integration Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0742.82 ▲1.01
Dashboard /wp-admin3.39 ▲0.0852.47 ▲2.44
Posts /wp-admin/edit.php3.50 ▲0.1449.53 ▼5.65
Add New Post /wp-admin/post-new.php5.97 ▲0.0886.27 ▼19.28
Media Library /wp-admin/upload.php3.31 ▲0.0839.66 ▲2.62
Posnet Printer /wp-admin/admin.php?page=posnet-printer-for-woocommerce3.2533.83

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 8 new options
New WordPress options
recovery_mode_email_last_sent
woocommerce_posnet_printer_config
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Posnet Printer Integration Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.34 ▼0.041.95 ▼0.2645.65 ▲3.06
Dashboard /wp-admin2,192 ▲155.54 ▼0.1587.48 ▼3.8339.09 ▼17.39
Posts /wp-admin/edit.php2,097 ▼61.99 ▼0.0435.52 ▼5.2133.32 ▼5.28
Add New Post /wp-admin/post-new.php1,526 ▼323.09 ▼0.09670.31 ▲13.0957.17 ▼3.04
Media Library /wp-admin/upload.php1,403 ▲94.19 ▼0.0297.92 ▲0.6144.81 ▲4.39
Posnet Printer /wp-admin/admin.php?page=posnet-printer-for-woocommerce7241.126.4421.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • woocommerce_posnet_printer_config
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=posnet-printer-for-woocommerce
    • > Error in wp-content/plugins/posnet-printer-for-woocommerce/posnet-printer-for-woocommerce.php+133
    Uncaught Error: Call to undefined function wc_get_orders() in wp-content/plugins/posnet-printer-for-woocommerce/posnet-printer-for-woocommerce.php:133
    Stack trace:
    #0 wp-content/plugins/posnet-printer-for-woocommerce/posnet-printer-for-woocommerce.php(431): Posnet_Printer_For_Woocommerce_Orders_Table->prepare_items()
    #1 wp-includes/class-wp-hook.php(310): posnet_printer_for_woocommerce_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention: The official readme.txt is a good inspiration

posnet-printer-for-woocommerce/posnet-printer-for-woocommerce.php 85% from 13 tests

The main PHP file in "Posnet Printer Integration Plugin" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0" instead of "3.0.0")
  • Domain Path: The domain path folder does not exist ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected374 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15580374

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected