10% new-order-popup

Code Review | New Order Notification

WordPress plugin New Order Notification scored10%from 54 tests.

About plugin

  • Plugin page: new-order-popup
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 11, 2022
  • Latest release: Aug 11, 2022
  • Number of updates: 11
  • Update frequency: every 3.0 days
  • Top authors: woodeliveryplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /664 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/new-order-popup/new-order-notification.php+123
    Undefined variable: woo_fs

Server metrics [RAM: ▲4.62MB] [CPU: ▲17.68ms] Passed 4 tests

This is a short check of server-side resources used by New Order Notification
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.51 ▲5.0062.36 ▲20.61
Dashboard /wp-admin8.53 ▲5.1871.80 ▲14.69
Posts /wp-admin/edit.php8.53 ▲5.1374.12 ▲20.24
Add New Post /wp-admin/post-new.php9.09 ▲3.16124.79 ▲15.17
Media Library /wp-admin/upload.php8.53 ▲5.2665.91 ▲29.54
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius8.5358.25
New Order Popup /wp-admin/options-general.php?page=nop-notification-settings8.5360.22

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 184 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
fs_accounts
fs_debug_mode
can_compress_scripts
widget_recent-comments
fs_active_plugins
widget_theysaidso_widget
fs_gdpr
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for New Order Notification
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲6714.25 ▼0.151.56 ▼0.1733.79 ▼13.09
Dashboard /wp-admin2,237 ▲575.70 ▲0.0594.16 ▲4.7539.80 ▼1.62
Posts /wp-admin/edit.php2,143 ▲432.05 ▲0.0834.34 ▼1.9834.41 ▼8.93
Add New Post /wp-admin/post-new.php1,553 ▲2523.02 ▼0.17597.15 ▼75.5459.70 ▼0.72
Media Library /wp-admin/upload.php1,439 ▲394.22 ▼0.07101.43 ▼1.8445.31 ▼0.35
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius1,0921.7727.2329.74
New Order Popup /wp-admin/options-general.php?page=nop-notification-settings1,2541.9331.2351.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/new-order-popup/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • db_upgraded
    • fs_active_plugins
    • fs_gdpr
    • widget_theysaidso_widget
    • fs_accounts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • fs_debug_mode

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/new-order-popup/admin/inc/nop-settings-page.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Nop_Notify_Template_Loader' not found in wp-content/plugins/new-order-popup/admin/classes/class-nop-template-loader.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Nop_Template_Loader' not found in wp-content/plugins/new-order-popup/nop-powerhouse.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/new-order-popup/templates/nop-render-popup.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: neworder, woocommerce, order, notification

new-order-popup/new-order-notification.php 62% from 13 tests

The entry point to "New Order Notification" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("new-order-popup.php" instead of "new-order-notification.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "5.2")
  • Requires PHP: Required version must match the one declared in readme.txt ("5.3.8" instead of "5.6")

Code Analysis 97% from 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 detected31,680 lines of code in 134 files:
LanguageFilesBlank linesComment linesLines of code
PHP1157,34716,40230,919
CSS12356324
Markdown1680214
JavaScript53460196
JSON10027

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity86.77
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.64
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes47
▷ Abstract classes24.26%
▷ Concrete classes4595.74%
▷ Final classes00.00%
Methods1,140
▷ Static methods17315.18%
▷ Public methods79769.91%
▷ Protected methods181.58%
▷ Private methods32528.51%
Functions104
▷ Named functions104100.00%
▷ Anonymous functions00.00%
Constants124
▷ Global constants9979.84%
▷ Class constants2520.16%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/confetti.png38.69KB12.76KB▼ 67.01%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/woonewordernotification.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%