94% acymailing-integration-for-woocommerce

Code Review | WooCommerce integration - AcyMailing

WordPress plugin WooCommerce integration - AcyMailing scored 94% from 54 tests.

About plugin

  • Plugin page: acymailing-integr...
  • Plugin version: 3.8
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9.2
  • WordPress version: 5.9.2
  • First release: Oct 1, 2020
  • Latest release: Mar 21, 2022
  • Number of updates: 25
  • Update frequency: every 21.5 days
  • Top authors: acyba (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 3,440 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by WooCommerce integration - AcyMailing
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0255.70 ▲0.69
Dashboard /wp-admin3.42 ▲0.0132.54 ▼1.63
Posts /wp-admin/edit.php3.65 ▲0.0136.65 ▲0.24
Add New Post /wp-admin/post-new.php6.90 ▼0.0795.10 ▼1,153.58
Media Library /wp-admin/upload.php3.31 ▲0.0025.42 ▼6.41

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce integration - AcyMailing
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲916.20 ▲0.325.68 ▲0.022.43 ▲0.08
Dashboard /wp-admin2,895 ▲406.13 ▼0.05118.48 ▼16.41151.41 ▼8.54
Posts /wp-admin/edit.php2,694 ▼03.24 ▲0.0163.32 ▲0.27141.16 ▼4.34
Add New Post /wp-admin/post-new.php1,711 ▼6221.32 ▼0.54457.25 ▲15.50159.86 ▲4.15
Media Library /wp-admin/upload.php1,698 ▼05.54 ▲0.04139.34 ▼11.22187.42 ▼3.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'AcyMailing\\Libraries\\acymPlugin' not found in wp-content/plugins/acymailing-integration-for-woocommerce/plugin.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/acymailing-integration-for-woocommerce/acymailing-woocommerce.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: integration, woocommerce, newsletter, acymailing

acymailing-integration-for-woocommerce/acymailing-woocommerce.php 92% from 13 tests

The main PHP script in "WooCommerce integration - AcyMailing" version 3.8 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("acymailing-integration-for-woocommerce.php" instead of "acymailing-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin2,430 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2366552,430

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity313.00
▷ Minimum class complexity313.00
▷ Maximum class complexity313.00
Average method complexity5.11
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods76
▷ Static methods00.00%
▷ Public methods6180.26%
▷ Protected methods00.00%
▷ Private methods1519.74%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon.png13.44KB13.28KB▼ 1.21%
banner.png15.24KB6.22KB▼ 59.22%