89% disable-cart-fragments

Code Review | Disable Cart Fragments by Optimocha

WordPress plugin Disable Cart Fragments by Optimocha scored89%from 54 tests.

About plugin

  • Plugin page: disable-cart-frag...
  • Plugin version: 2.3
  • PHP compatiblity: 5.6 or later+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-6.2
  • WordPress version: 6.3.1
  • First release: May 30, 2019
  • Latest release: Jun 26, 2023
  • Number of updates: 25
  • Update frequency: every 59.5 days
  • Top authors: optimocha (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

10,000+ active /108,160 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.83ms] Passed 4 tests

A check of server-side resources used by Disable Cart Fragments by Optimocha
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.69 ▼5.19
Dashboard /wp-admin3.34 ▲0.0450.18 ▼10.05
Posts /wp-admin/edit.php3.39 ▲0.0451.62 ▼0.86
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.55 ▼11.23
Media Library /wp-admin/upload.php3.27 ▲0.0436.39 ▲0.55

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Disable Cart Fragments by Optimocha: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.26 ▼0.101.64 ▼0.1042.28 ▼2.55
Dashboard /wp-admin2,213 ▲395.55 ▼0.1292.10 ▼10.5740.18 ▼3.52
Posts /wp-admin/edit.php2,121 ▲211.99 ▼0.0341.26 ▲1.6837.27 ▼1.43
Add New Post /wp-admin/post-new.php1,548 ▲2218.23 ▼5.40619.03 ▼87.1565.94 ▲8.87
Media Library /wp-admin/upload.php1,415 ▲124.17 ▼0.04101.83 ▲0.8341.50 ▼1.76

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: woocommerce cart fragments, woocommerce, cart fragments, disable cart fragments

disable-cart-fragments/disable-cart-fragments.php 85% from 13 tests

"Disable Cart Fragments by Optimocha" version 2.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.6" instead of "2.0")
  • Requires PHP: Periods and digits should be used for the required version number (ex. "7.0" instead of "5.6 or later")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected170 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35441170

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity13.00
▷ Minimum class complexity9.00
▷ Maximum class complexity17.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods428.57%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin