79% comoquiero

Code Review | Qcart

WordPress plugin Qcart scored79%from 54 tests.

About plugin

  • Plugin page: comoquiero
  • Plugin version: 23.09.131449
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 6, 2021
  • Latest release: Sep 13, 2023
  • Number of updates: 188
  • Update frequency: every 3.9 days
  • Top authors: comoquiero (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,373 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Qcart
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.61 ▼7.02
Dashboard /wp-admin3.32 ▲0.0148.15 ▼8.95
Posts /wp-admin/edit.php3.37 ▲0.0148.18 ▼0.57
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.03 ▼12.32
Media Library /wp-admin/upload.php3.24 ▲0.0136.30 ▼0.09
Qcart /wp-admin/options-general.php?page=qcart3.2332.45

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Qcart
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲20918.45 ▲4.2182.10 ▲80.4045.70 ▲3.37
Dashboard /wp-admin2,215 ▲275.86 ▲0.98101.34 ▲2.4242.23 ▼1.79
Posts /wp-admin/edit.php2,101 ▲122.03 ▲0.0140.19 ▲5.1143.62 ▲5.82
Add New Post /wp-admin/post-new.php1,536 ▲2223.35 ▲5.85657.35 ▼51.3549.42 ▼7.66
Media Library /wp-admin/upload.php1,394 ▲64.29 ▲0.01100.53 ▼4.1442.13 ▼5.09
Qcart /wp-admin/options-general.php?page=qcart7742.0322.2326.43

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/comoquiero/templates/settings.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: error in wp-content/plugins/comoquiero/templates/settings.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/comoquiero/comoquiero.php:13
    • > PHP Notice
      Undefined variable: updated in wp-content/plugins/comoquiero/templates/settings.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/comoquiero/qcart-settings.php:4
    • > PHP Notice
      Undefined variable: error in wp-content/plugins/comoquiero/templates/settings.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/comoquiero/settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: qcart, qcar, recipe, qc, cart...

comoquiero/comoquiero.php Passed 13 tests

The primary PHP file in "Qcart" version 23.09.131449 is used by WordPress to initiate all plugin functionality
120 characters long description:
Your plugin to automatically allow your users to add a shopping list cart for your recipes, display nutrition, and more!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin347 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP47943301
JavaScript30034
JSON10012

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity9.50
▷ Minimum class complexity4.00
▷ Maximum class complexity15.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods4100.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions1083.33%
▷ Anonymous functions216.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin