90% notify-odoo

Code Review | Notify Odoo

WordPress plugin Notify Odoo scored90%from 54 tests.

About plugin

  • Plugin page: notify-odoo
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 13, 2019
  • Latest release: Nov 16, 2022
  • Number of updates: 8
  • Update frequency: every 145.0 days
  • Top authors: pektsekye (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,253 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.05ms] Passed 4 tests

Analyzing server-side resources used by Notify Odoo
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.34 ▲1.42
Dashboard /wp-admin3.32 ▼0.0244.05 ▼12.39
Posts /wp-admin/edit.php3.37 ▲0.0247.97 ▼2.91
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.60 ▼23.56
Media Library /wp-admin/upload.php3.24 ▲0.0234.58 ▼1.32

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: 1 new table, 12 new options
New tables
wp_notifyodoo_notifications
New WordPress options
widget_theysaidso_widget
notifyodoo_allow_ip_address
theysaidso_admin_options
db_upgraded
can_compress_scripts
notifyodoo_notify_about_new_order
notifyodoo_last_access_ip_address
notifyodoo_notify_about_new_customer
widget_recent-comments
notifyodoo_add_tracking_image
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Notify Odoo
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.28 ▼1.091.79 ▲0.1647.05 ▲5.37
Dashboard /wp-admin2,222 ▲405.85 ▼0.02103.98 ▼2.4340.38 ▼7.57
Posts /wp-admin/edit.php2,105 ▲162.03 ▲0.0238.03 ▼4.5532.81 ▼4.08
Add New Post /wp-admin/post-new.php1,535 ▼223.27 ▲5.10584.39 ▼49.0557.06 ▲3.71
Media Library /wp-admin/upload.php1,407 ▲194.20 ▼0.02100.07 ▲0.9841.27 ▼2.42

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: new order, woocommerce, export orders, odoo

notify-odoo/notify-odoo.php Passed 13 tests

The entry point to "Notify Odoo" version 1.0.0 is a PHP file that has certain tags in its header comment area
47 characters long description:
Notifies Odoo about a new order on WooCommerce.

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
Good job! No executable or dangerous file extensions detected476 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP919318472
CSS1204

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.43
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods46
▷ Static methods510.87%
▷ Public methods4086.96%
▷ Protected methods12.17%
▷ Private methods510.87%
Functions1
▷ Named functions1100.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.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
view/adminhtml/web/no/screenshot_response.png27.19KB6.60KB▼ 75.74%