90% happy-cart

Code Review | Happy Cart WordPress Plugin

WordPress plugin Happy Cart WordPress Plugin scored90%from 54 tests.

About plugin

  • Plugin page: happy-cart
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 23, 2022
  • Latest release: Dec 23, 2022
  • Number of updates: 5
  • Update frequency: every 2.4 days
  • Top authors: happycart (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /134 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.91ms] Passed 4 tests

Analyzing server-side resources used by Happy Cart WordPress Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.27 ▼16.69
Dashboard /wp-admin3.33 ▲0.0345.35 ▼5.72
Posts /wp-admin/edit.php3.38 ▲0.0249.34 ▲1.31
Add New Post /wp-admin/post-new.php5.93 ▲0.04106.15 ▲4.11
Media Library /wp-admin/upload.php3.25 ▲0.0237.21 ▲1.46

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Happy Cart WordPress Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲7713.47 ▼0.8813.71 ▲11.3335.57 ▼5.56
Dashboard /wp-admin2,218 ▲445.62 ▼0.0489.78 ▼1.3237.20 ▼4.47
Posts /wp-admin/edit.php2,123 ▲232.02 ▲0.0339.93 ▲3.4135.73 ▼4.01
Add New Post /wp-admin/post-new.php1,552 ▲2618.35 ▼4.60622.94 ▼79.4165.84 ▲15.20
Media Library /wp-admin/upload.php1,417 ▲174.11 ▼0.14103.82 ▼3.8042.91 ▼2.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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
Please fix the following attributes:
  • Contributors: Contributors not specified
Please take inspiration from this readme.txt

happy-cart/happy-cart.php Passed 13 tests

The main file in "Happy Cart WordPress Plugin" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
31 characters long description:
The Happy Cart WordPress plugin

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
There were no executable files found in this plugin384 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP10114482366
JSON10012
CSS1143
JavaScript12273

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.71
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.74
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods3085.71%
▷ Protected methods00.00%
▷ Private methods514.29%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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