84% api2cart-bridge-connector

Code Review | Api2Cart Bridge Connector

WordPress plugin Api2Cart Bridge Connector scored84%from 54 tests.

About plugin

  • Plugin page: api2cart-bridge-c...
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: May 12, 2022
  • Latest release: Oct 26, 2023
  • Number of updates: 20
  • Update frequency: every 26.6 days
  • Top authors: api2cartdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,684 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.86ms] Passed 4 tests

A check of server-side resources used by Api2Cart Bridge Connector
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.55 ▲3.47
Dashboard /wp-admin3.31 ▲0.0046.68 ▼1.63
Posts /wp-admin/edit.php3.36 ▲0.0043.24 ▼2.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.98 ▼7.59
Media Library /wp-admin/upload.php3.23 ▲0.0035.17 ▲0.51

Server storage [IO: ▲0.12MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Api2Cart Bridge Connector
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.141.64 ▲0.0845.85 ▲1.61
Dashboard /wp-admin2,198 ▲305.63 ▲0.0385.30 ▼0.3038.77 ▼2.36
Posts /wp-admin/edit.php2,079 ▼211.99 ▼0.0233.37 ▼0.5433.81 ▼1.62
Add New Post /wp-admin/post-new.php1,526 ▼222.94 ▼0.10660.73 ▼16.2156.55 ▼1.74
Media Library /wp-admin/upload.php1,403 ▼04.18 ▲0.0293.03 ▼8.0143.75 ▲0.65

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/api2cart-bridge-connector/worker.php
    • > /wp-content/plugins/api2cart-bridge-connector/connectorMain.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: api2cart bridge download, woocommerce b2b connector, bridge connector

api2cart-bridge-connector/connectorMain.php 92% from 13 tests

The principal PHP file in "Api2Cart Bridge Connector" v. 2.2.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("api2cart-bridge-connector.php" instead of "connectorMain.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected2,781 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP96249552,433
CSS1220184
JavaScript1300164

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity18.75
▷ Minimum class complexity1.00
▷ Maximum class complexity149.00
Average method complexity3.61
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes19
▷ Abstract classes15.26%
▷ Concrete classes1894.74%
▷ Final classes00.00%
Methods130
▷ Static methods75.38%
▷ Public methods9069.23%
▷ Protected methods2116.15%
▷ Private methods1914.62%
Functions27
▷ Named functions1451.85%
▷ Anonymous functions1348.15%
Constants18
▷ Global constants1055.56%
▷ Class constants844.44%
▷ Public constants8100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png17.83KB6.02KB▼ 66.26%