84% carts-guru

Code Review | Carts Guru

WordPress plugin Carts Guru scored84%from 54 tests.

About plugin

  • Plugin page: carts-guru
  • Plugin version: 1.4.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.2
  • WordPress version: 6.3.1
  • First release: Mar 9, 2016
  • Latest release: Apr 30, 2020
  • Number of updates: 81
  • Update frequency: every 18.7 days
  • Top authors: cartsguru (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active /5,165 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.41ms] Passed 4 tests

An overview of server-side resources used by Carts Guru
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.25 ▼6.25
Dashboard /wp-admin3.34 ▲0.0343.40 ▼5.43
Posts /wp-admin/edit.php3.45 ▲0.0942.45 ▼10.12
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.72 ▼3.82
Media Library /wp-admin/upload.php3.26 ▲0.0333.01 ▼0.59

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 30 new files
Database: 1 new table, 7 new options
New tables
wp_cartsguru_carts
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
cartsguru_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Carts Guru
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.08 ▼0.621.60 ▼0.1838.54 ▼5.99
Dashboard /wp-admin2,198 ▲215.51 ▼0.1584.57 ▼13.7841.27 ▼8.27
Posts /wp-admin/edit.php2,097 ▼31.96 ▼0.0532.93 ▼3.5833.17 ▼1.03
Add New Post /wp-admin/post-new.php1,535 ▼118.26 ▲0.34614.87 ▼4.9573.88 ▲12.40
Media Library /wp-admin/upload.php1,403 ▲34.18 ▼0.0397.32 ▼0.1142.56 ▼2.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/carts-guru/templates/pixel.php
    • > /wp-content/plugins/carts-guru/trunk/templates/pixel.php
    • > /wp-content/plugins/carts-guru/templates/checkout.php
    • > /wp-content/plugins/carts-guru/trunk/templates/checkout.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #5, #6 in carts-guru/assets to your readme.txt
You can look at the official readme.txt

carts-guru/cartsguru-woocommerce.php 92% from 13 tests

The principal PHP file in "Carts Guru" v. 1.4.7 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("carts-guru.php" instead of "cartsguru-woocommerce.php")

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
Good job! No executable or dangerous file extensions detected1,384 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP102301911,303
PO File2141481

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity24.86
▷ Minimum class complexity3.00
▷ Maximum class complexity96.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods138
▷ Static methods2014.49%
▷ Public methods11079.71%
▷ Protected methods64.35%
▷ Private methods2215.94%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected