90% sticky-add-to-cart

Code Review | Sticky Add to Cart

WordPress plugin Sticky Add to Cart scored90%from 54 tests.

About plugin

  • Plugin page: sticky-add-to-cart
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.8
  • WordPress version: 6.3.1
  • First release: Sep 8, 2018
  • Latest release: Sep 8, 2018
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: bankthaworn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,464 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Sticky Add to Cart
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.23 ▲5.16
Dashboard /wp-admin3.32 ▲0.0147.58 ▼4.34
Posts /wp-admin/edit.php3.37 ▲0.0148.03 ▼4.75
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.74 ▼13.08
Media Library /wp-admin/upload.php3.24 ▲0.0038.90 ▲2.51

Server storage [IO: ▲0.00MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
It is recommended to fix the following issues
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/sticky-add-to-cart/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Sticky Add to Cart
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.16 ▼1.191.95 ▲0.2045.15 ▲6.56
Dashboard /wp-admin2,221 ▲154.81 ▼0.07101.29 ▼12.4644.76 ▲4.18
Posts /wp-admin/edit.php2,079 ▼242.04 ▼0.0134.12 ▼5.2837.51 ▼10.56
Add New Post /wp-admin/post-new.php1,546 ▲1522.94 ▼0.27626.35 ▼35.7152.92 ▼3.41
Media Library /wp-admin/upload.php1,400 ▲34.19 ▲0.0295.25 ▼3.5342.80 ▼4.53

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: woocommerce, sticky add to cart, add to cart

sticky-add-to-cart/sticky-add-to-cart.php Passed 13 tests

The primary PHP file in "Sticky Add to Cart" version 1.0.0 is used by WordPress to initiate all plugin functionality
122 characters long description:
Show sticky add to cart at the bottom on mobile screen. Also included add to wishlist and social media chat (coming soon).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected49 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1101349

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.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
No PNG files were detected