89% woocomm-popup-cart-ajax

Code Review | WooCommerce Modal Fly Cart + Ajax add to cart

WordPress plugin WooCommerce Modal Fly Cart + Ajax add to cart scored89%from 54 tests.

About plugin

  • Plugin page: woocomm-popup-car...
  • Plugin version: 1.5.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 8, 2017
  • Latest release: Oct 11, 2023
  • Number of updates: 75
  • Update frequency: every 28.4 days
  • Top authors: athemeart (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

4,000+ active /170,829 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by WooCommerce Modal Fly Cart + Ajax add to cart
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.68 ▲1.29
Dashboard /wp-admin3.33 ▼0.0248.82 ▼18.25
Posts /wp-admin/edit.php3.38 ▲0.0250.11 ▼0.17
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.39 ▼14.78
Media Library /wp-admin/upload.php3.25 ▲0.0239.72 ▲3.71

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Modal Fly Cart + Ajax add to cart
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.37 ▼0.281.94 ▼0.1343.81 ▼0.83
Dashboard /wp-admin2,218 ▲415.68 ▲0.1185.14 ▼7.5543.93 ▲3.63
Posts /wp-admin/edit.php2,120 ▲202.19 ▲0.1636.66 ▼3.2341.55 ▲3.85
Add New Post /wp-admin/post-new.php1,541 ▲1017.45 ▼5.99656.00 ▼51.4556.82 ▼1.24
Media Library /wp-admin/upload.php1,420 ▲204.22 ▲0.03113.19 ▲2.6950.38 ▲5.24

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: Please add images for these screenshots: #1 (Plugins Options), #2 (preview screen 1), #3 (preview screen 2)
You can take inspiration from this readme.txt

woocomm-popup-cart-ajax/woocommerce-modal-fly-cart.php 85% from 13 tests

The entry point to "WooCommerce Modal Fly Cart + Ajax add to cart" version 1.5.4 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "4.6")
  • Main file name: Name the main plugin file the same as the plugin slug ("woocomm-popup-cart-ajax.php" instead of "woocommerce-modal-fly-cart.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected5,728 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript8541882,938
PO File84485041,008
PHP4258157890
CSS58151866
SVG114026

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.36
Average class complexity24.75
▷ Minimum class complexity3.00
▷ Maximum class complexity65.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods34
▷ Static methods38.82%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.58MB with 0.39MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png212.39KB52.80KB▼ 75.14%
screenshot-0.png101.20KB50.78KB▼ 49.82%
screenshot-1.png283.24KB71.94KB▼ 74.60%