83% easy-cart

Code Review | Easy Cart

WordPress plugin Easy Cart scored83%from 54 tests.

About plugin

  • Plugin page: easy-cart
  • Plugin version: 1.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Mar 5, 2021
  • Latest release: Sep 28, 2023
  • Number of updates: 13
  • Update frequency: every 72.2 days
  • Top authors: zeshanb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /537 total downloads

Benchmarks

Plugin footprint 83% 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.03MB] [CPU: ▼4.80ms] Passed 4 tests

This is a short check of server-side resources used by Easy Cart
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.50 ▲1.46
Dashboard /wp-admin3.35 ▲0.0049.10 ▼12.89
Posts /wp-admin/edit.php3.40 ▲0.0444.64 ▼2.86
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.93 ▼3.42
Media Library /wp-admin/upload.php3.27 ▲0.0433.65 ▼0.03

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Easy Cart
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲5414.35 ▲0.101.70 ▲0.1443.99 ▼8.78
Dashboard /wp-admin2,198 ▲215.63 ▲0.0290.84 ▲1.1639.45 ▲2.98
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0439.60 ▲1.9935.33 ▲1.54
Add New Post /wp-admin/post-new.php1,531 ▼623.39 ▲4.93656.04 ▼3.6499.27 ▲9.96
Media Library /wp-admin/upload.php1,394 ▼94.27 ▲0.0597.08 ▼1.7441.05 ▼0.05

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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
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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-cart/plugin.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: transient storage, shopping cart, sessions, shortcode

easy-cart/plugin.php 62% from 13 tests

The main PHP file in "Easy Cart" ver. 1.8 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 279 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("easy-cart.php" instead of "plugin.php")
  • Domain Path: The domain path points to a folder that does not exist ("/public/lang")
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("8.0" instead of "5.6")

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 detected180 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP112639180

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin