74% ctcl-floating-cart

Code Review | Ctcl Floating Cart

WordPress plugin Ctcl Floating Cart scored74%from 54 tests.

About plugin

  • Plugin page: ctcl-floating-cart
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.3.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 5, 2023
  • Latest release: Oct 5, 2023
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: ujw0l (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /11 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.94MB] [CPU: ▼52.03ms] Passed 4 tests

A check of server-side resources used by Ctcl Floating Cart
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.424.39 ▼42.71
Dashboard /wp-admin2.07 ▼1.247.14 ▼41.22
Posts /wp-admin/edit.php2.07 ▼1.295.19 ▼39.16
Add New Post /wp-admin/post-new.php2.07 ▼3.827.27 ▼85.02
Media Library /wp-admin/upload.php2.07 ▼1.165.62 ▼31.61

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Ctcl Floating Cart
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲16113.69 ▼0.965.96 ▲3.5843.93 ▼0.30
Dashboard /wp-admin2,218 ▲274.89 ▲0.00102.67 ▼2.0540.70 ▲1.13
Posts /wp-admin/edit.php2,108 ▲192.04 ▲0.0538.40 ▲0.2033.26 ▲1.17
Add New Post /wp-admin/post-new.php1,537 ▲2323.17 ▲5.62679.35 ▲73.3260.73 ▲12.15
Media Library /wp-admin/upload.php1,408 ▲234.28 ▲0.0999.50 ▼26.5341.58 ▼5.87

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the thickbox handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/ctcl-floating-cart/ctcl-floating-cart.php:32

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Adding navigation block on Appearance > Editor section), #2 (Floating cart on frontend(userfacing side))
The official readme.txt might help

ctcl-floating-cart/ctcl-floating-cart.php 92% from 13 tests

Analyzing the main PHP file in "Ctcl Floating Cart" version 0.1.0
Please take the time to fix the following:
  • Git Repository: A Git repository was detected inside this plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin16,385 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JSON40016,139
JavaScript611771210
PHP372317
Sass22017
CSS2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
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
3 PNG files occupy 0.35MB with 0.24MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png141.98KB37.13KB▼ 73.85%
screenshot-2.png190.41KB61.93KB▼ 67.48%
screenshot-3.png29.58KB10.80KB▼ 63.48%