84% byconsole-greetingcard

Code Review | Complimentary greetings card for WooCommerce

WordPress plugin Complimentary greetings card for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: byconsole-greetin...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.2.2
  • WordPress version: 6.3.1
  • First release: May 18, 2017
  • Latest release: Aug 26, 2019
  • Number of updates: 8
  • Update frequency: every 103.8 days
  • Top authors: mdalabar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,145 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.86ms] Passed 4 tests

Analyzing server-side resources used by Complimentary greetings card for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.20 ▲3.44
Dashboard /wp-admin3.39 ▲0.0848.15 ▼5.33
Posts /wp-admin/edit.php3.44 ▲0.0853.15 ▼0.86
Add New Post /wp-admin/post-new.php5.97 ▲0.0895.29 ▼2.42
Media Library /wp-admin/upload.php3.31 ▲0.0837.29 ▲1.19

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Complimentary greetings card for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲12813.95 ▼0.438.13 ▲5.8638.61 ▼9.01
Dashboard /wp-admin2,225 ▲374.91 ▼0.9798.72 ▼19.1740.35 ▼9.46
Posts /wp-admin/edit.php2,105 ▲192.01 ▲0.0241.04 ▲0.8134.78 ▼0.28
Add New Post /wp-admin/post-new.php1,550 ▲1723.28 ▲0.12611.14 ▼74.2350.44 ▼4.59
Media Library /wp-admin/upload.php1,404 ▲164.19 ▲0.04100.02 ▼10.5243.91 ▼2.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/byconsole-greetingcard/inc/admin.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: greetings card, gift shop, flower shop, woocommerce greetings card, woocommerce gift message...

byconsole-greetingcard/ByconsoleCusGreetingCard.php 85% from 13 tests

The main PHP file in "Complimentary greetings card for WooCommerce" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("byconsole-greetingcard.php" instead of "ByconsoleCusGreetingCard.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected305 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP250916269
JavaScript178520
CSS135116

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin