64% ctc-lite

Code Review | CT Commerce Lite

WordPress plugin CT Commerce Lite scored64%from 54 tests.

About plugin

  • Plugin page: ctc-lite
  • Plugin version: 2.1.2
  • PHP compatiblity: 7.4.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 6, 2020
  • Latest release: Nov 14, 2023
  • Number of updates: 54
  • Update frequency: every 20.4 days
  • Top authors: ujw0l (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,201 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.33MB] [CPU: ▲0.30ms] Passed 4 tests

This is a short check of server-side resources used by CT Commerce Lite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3644.51 ▼0.21
Dashboard /wp-admin3.63 ▲0.3348.20 ▼3.13
Posts /wp-admin/edit.php3.75 ▲0.3949.29 ▲0.61
Add New Post /wp-admin/post-new.php6.19 ▲0.3099.23 ▲4.51
Media Library /wp-admin/upload.php3.56 ▲0.3239.70 ▲3.92

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for CT Commerce Lite
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲4114.31 ▲0.082.07 ▲0.1142.23 ▼2.08
Dashboard /wp-admin2,222 ▲455.63 ▲0.0891.76 ▼2.4139.31 ▼4.18
Posts /wp-admin/edit.php2,130 ▲301.97 ▲0.0135.27 ▼3.2632.42 ▼0.51
Add New Post /wp-admin/post-new.php6,397 ▲4,87128.02 ▲4.97798.09 ▲122.5135.13 ▼15.37
Media Library /wp-admin/upload.php1,427 ▲364.19 ▼0.0797.11 ▼7.2140.31 ▼5.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'ctcLite' does not have a method 'ctcLiteUninstall'
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_ctclOrders
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 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 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 fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/ctc-lite/ctc-lite.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Product Page), #2 (Checkout page), #3 (Billing Tab), #4 (Shipping Tab), #5 (Email Tab), #6 (Peding Order Tab), #7 (Order detail modal), #8 (Add product gutenberg blocks), #9 (Checkout page gutenberg blocks), #10 (Processing page gutenberg block), #11 (Image gallery in overlay)
The official readme.txt is a good inspiration

ctc-lite/ctc-lite.php Passed 13 tests

"CT Commerce Lite" version 2.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
33 characters long description:
CT Commerce Lite ecommerce plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin3,792 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript64563421,903
PHP52563681,104
CSS312010719
Markdown115038
JSON10028

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity14.00
▷ Minimum class complexity3.00
▷ Maximum class complexity42.00
Average method complexity1.98
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods62
▷ Static methods00.00%
▷ Public methods5182.26%
▷ Protected methods00.00%
▷ Private methods1117.74%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
11 PNG files occupy 2.34MB with 1.56MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-8.png138.04KB50.06KB▼ 63.74%
screenshot-1.png770.08KB229.72KB▼ 70.17%
screenshot-9.png123.54KB45.59KB▼ 63.10%
screenshot-5.png181.65KB49.04KB▼ 73.00%
screenshot-2.png98.49KB37.50KB▼ 61.92%