99% abantecart-embedding

Code Review | AbanteCart Embed

WordPress plugin AbanteCart Embed scored 99% from 54 tests.

About plugin

  • Plugin page: abantecart-embedding
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9.1
  • WordPress version: 5.9.2
  • First release: Mar 23, 2021
  • Latest release: Jan 28, 2022
  • Number of updates: 13
  • Update frequency: every 24.2 days
  • Top authors: abantecart (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 473 total downloads

Benchmarks

Plugin footprint Passed 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.04MB] [CPU: ▼294.17ms] Passed 4 tests

This is a short check of server-side resources used by AbanteCart Embed
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1256.52 ▲4.45
Dashboard /wp-admin3.48 ▲0.0734.60 ▲0.98
Posts /wp-admin/edit.php3.70 ▲0.0641.25 ▲4.71
Add New Post /wp-admin/post-new.php6.97 ▼0.0296.28 ▼1,183.28
Media Library /wp-admin/upload.php3.35 ▲0.0626.64 ▲1.17
Help /wp-admin/admin.php?page=Abantecart_help3.3424.38
Settings /wp-admin/admin.php?page=Abantecart3.3328.72

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 1 new option
New WordPress options
Abantecart_version

Browser metrics Passed 4 tests

AbanteCart Embed: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,830 ▲8615.98 ▲0.256.13 ▼0.412.29 ▲0.04
Dashboard /wp-admin2,959 ▲1016.13 ▼0.07131.27 ▼3.72187.19 ▲23.21
Posts /wp-admin/edit.php2,718 ▲333.16 ▼0.0764.48 ▼1.62140.88 ▼5.24
Add New Post /wp-admin/post-new.php1,742 ▲8121.95 ▲5.82415.88 ▼6.13188.25 ▲35.81
Media Library /wp-admin/upload.php1,728 ▲275.52 ▼0.01131.16 ▼20.67208.78 ▲27.00
Help /wp-admin/admin.php?page=Abantecart_help1,1892.4258.26115.97
Settings /wp-admin/admin.php?page=Abantecart1,0852.4254.76102.92

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: ecommerce, online store, commerce, checkout, cart...

abantecart-embedding/index.php 85% from 13 tests

The main PHP script in "AbanteCart Embed" version 1.0.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("abantecart-embedding.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 148 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,016 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS11290546
PHP66393451
JavaScript11019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods18
▷ Static methods15.56%
▷ Public methods1794.44%
▷ Protected methods00.00%
▷ Private methods15.56%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.58MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/wp-7.png174.82KB82.28KB▼ 52.94%
assets/img/icon.png13.29KB0.86KB▼ 93.50%
assets/img/wp-3.png74.38KB39.57KB▼ 46.80%
assets/img/icon-256x256.png21.35KB6.85KB▼ 67.91%
assets/img/wp-4.png65.98KB35.66KB▼ 45.96%