84% puacw-wc-cart

Code Review | Pop-Up Ajax Cart for Woocommerce

WordPress plugin Pop-Up Ajax Cart for Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: puacw-wc-cart
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Jul 7, 2021
  • Latest release: Jan 29, 2022
  • Number of updates: 4
  • Update frequency: every 51.5 days
  • Top authors: markusvannorlen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /408 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: ▼8.69ms] Passed 4 tests

Server-side resources used by Pop-Up Ajax Cart for Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.23 ▼2.14
Dashboard /wp-admin3.33 ▼0.0251.97 ▼14.49
Posts /wp-admin/edit.php3.38 ▲0.0248.96 ▼0.94
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.32 ▼17.19
Media Library /wp-admin/upload.php3.25 ▲0.0238.75 ▲2.64

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pop-Up Ajax Cart for Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.63 ▲0.201.72 ▼0.0043.69 ▲1.57
Dashboard /wp-admin2,198 ▲245.62 ▲0.0483.38 ▼17.9639.71 ▲0.20
Posts /wp-admin/edit.php2,097 ▼62.03 ▲0.0136.30 ▼4.1035.68 ▼2.41
Add New Post /wp-admin/post-new.php1,526 ▼223.48 ▲0.37684.84 ▼3.3655.08 ▼6.48
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0196.97 ▼15.2345.10 ▼3.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 2× 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/puacw-wc-cart/public/partials/puacw-display-pop-up.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/puacw-wc-cart/public/partials/puacw-display-basket-counter.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: woocommerce, pop-up, ajax, cart

puacw-wc-cart/puacw-woo-cart.php 85% from 13 tests

"Pop-Up Ajax Cart for Woocommerce" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("puacw-wc-cart.php" instead of "puacw-woo-cart.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected884 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP13158595510
CSS2378233
JavaScript212586
PO File1192755

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.14
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.35
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods3581.40%
▷ Protected methods00.00%
▷ Private methods818.60%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin