78% creamailer-for-woocommerce

Code Review | Creamailer for WooCommerce

WordPress plugin Creamailer for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: creamailer-for-wo...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.2-6.2
  • WordPress version: 6.3.1
  • First release: Jun 22, 2021
  • Latest release: May 19, 2023
  • Number of updates: 10
  • Update frequency: every 70.1 days
  • Top authors: creamailer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

This is a short check of server-side resources used by Creamailer for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.25 ▼1.23
Dashboard /wp-admin3.32 ▲0.0244.27 ▼4.30
Posts /wp-admin/edit.php3.37 ▲0.0249.62 ▲2.16
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.90 ▼3.30
Media Library /wp-admin/upload.php3.25 ▲0.0239.25 ▲3.69
Creamailer WooCommerce /wp-admin/options-general.php?page=creamailer-for-woocommerce3.1931.34

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Creamailer for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.22 ▼1.082.08 ▲0.2844.44 ▲0.51
Dashboard /wp-admin2,208 ▲205.86 ▲0.95102.94 ▼13.6040.36 ▼6.09
Posts /wp-admin/edit.php2,100 ▲112.02 ▲0.0135.92 ▼1.0532.27 ▼2.19
Add New Post /wp-admin/post-new.php1,359 ▼15517.10 ▼0.56556.42 ▼131.1557.93 ▲6.51
Media Library /wp-admin/upload.php1,396 ▲54.28 ▲0.0596.53 ▼2.6142.58 ▲0.38
Creamailer WooCommerce /wp-admin/options-general.php?page=creamailer-for-woocommerce8752.0522.4533.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=creamailer-for-woocommerce
    • > Notice in wp-content/plugins/creamailer-for-woocommerce/src/wp-creamailer-for-wordpress-plugin.php+275
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/creamailer-for-woocommerce/main.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/creamailer-for-woocommerce/index.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
1 plugin tags: integration

creamailer-for-woocommerce/main.php 92% from 13 tests

"Creamailer for WooCommerce" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("creamailer-for-woocommerce.php" instead of "main.php")

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
Success! There were no dangerous files found in this plugin564 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP64461409
PO File1243065
CSS116064
JavaScript17126

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.25
Average class complexity11.33
▷ Minimum class complexity3.00
▷ Maximum class complexity16.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods2177.78%
▷ Protected methods13.70%
▷ Private methods518.52%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png31.44KB10.78KB▼ 65.70%