74% agora-abandoned-cart

Code Review | Agora Abandoned Cart

WordPress plugin Agora Abandoned Cart scored74%from 54 tests.

About plugin

  • Plugin page: agora-abandoned-cart
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.7
  • WordPress version: 6.3.1
  • First release: Mar 19, 2021
  • Latest release: Mar 21, 2021
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: endisha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /408 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.33MB] [CPU: ▲22.57ms] Passed 4 tests

An overview of server-side resources used by Agora Abandoned Cart
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3773.35 ▲35.12
Dashboard /wp-admin3.65 ▲0.3578.61 ▲29.72
Posts /wp-admin/edit.php3.70 ▲0.3582.80 ▲35.47
Add New Post /wp-admin/post-new.php6.24 ▲0.35119.99 ▲18.66
Media Library /wp-admin/upload.php3.49 ▲0.2643.37 ▲6.77
Abandoned Cart /wp-admin/admin.php?page=abcart3.4966.94

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 35 new files
Database: 2 new tables, 6 new options
New tables
wp_agora_abandoned_cart_queue
wp_agora_abandoned_cart
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Agora Abandoned Cart
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9713.72 ▼0.681.90 ▲0.1344.29 ▼0.36
Dashboard /wp-admin2,249 ▲574.86 ▼0.11104.48 ▼18.0040.37 ▼7.64
Posts /wp-admin/edit.php2,132 ▲462.02 ▲0.0040.13 ▲2.4034.77 ▲0.55
Add New Post /wp-admin/post-new.php1,576 ▲3318.56 ▲0.52653.01 ▼26.9752.35 ▲3.32
Media Library /wp-admin/upload.php1,434 ▲464.21 ▲0.00102.54 ▲1.7843.75 ▲0.57
Abandoned Cart /wp-admin/admin.php?page=abcart1,0572.7947.7537.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_agora_abandoned_cart_queue
    • wp_agora_abandoned_cart
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following items
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Trait 'AgoraAbandonedCart\\Classes\\ScheduleTrait' not found in wp-content/plugins/agora-abandoned-cart/classes/schedule-manger.class.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AgoraAbandonedCart\\Classes\\register_activation_hook() in wp-content/plugins/agora-abandoned-cart/classes/migration-db.class.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'AgoraAbandonedCart\\Classes\\Helpers\\InputFilterHelper' not found in wp-content/plugins/agora-abandoned-cart/admin/views/settings.tab.php:5
    • > PHP Fatal error
      Trait 'AgoraAbandonedCart\\Classes\\QueueManager' not found in wp-content/plugins/agora-abandoned-cart/classes/hooks.class.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'AgoraAbandonedCart\\Classes\\Helpers\\AdminPageHelper' not found in wp-content/plugins/agora-abandoned-cart/admin/views/nav.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/agora-abandoned-cart/admin/views/scheduled-notifications.tab.php:6
    • > PHP Fatal error
      Trait 'AgoraAbandonedCart\\Classes\\ScheduleTrait' not found in wp-content/plugins/agora-abandoned-cart/classes/dashboard.class.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'AgoraAbandonedCart\\Classes\\Helpers\\AdminPageHelper' not found in wp-content/plugins/agora-abandoned-cart/admin/views/nav.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/agora-abandoned-cart/admin/views/queue-monitor.tab.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AgoraAbandonedCart\\Classes\\add_action() in wp-content/plugins/agora-abandoned-cart/classes/ajax.class.php:28

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 Passed 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
5 plugin tags: woocommerce, agora, abandoned, email notifications, cart

agora-abandoned-cart/agora-abandoned-cart.php Passed 13 tests

"Agora Abandoned Cart" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
129 characters long description:
Send asynchronous emails and push notifications to your logged-in woocommerce customers, reminding them of their abandoned carts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin12,881 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61,1611,4859,600
PHP212072781,657
CSS243481,454
PO File16174149
SQL20021

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces2
Interfaces0
Traits3
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods64
▷ Static methods1625.00%
▷ Public methods5078.12%
▷ Protected methods57.81%
▷ Private methods914.06%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/logo.png15.09KB4.85KB▼ 67.87%