10% cardzware-greeting-cards

Code Review | Official Cardzware plugin Wordpress for Woocommerce

WordPress plugin Official Cardzware plugin Wordpress for Woocommerce scored10%from 54 tests.

About plugin

  • Plugin page: cardzware-greetin...
  • Plugin version: 1.0.14
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1
  • WordPress version: 6.3.1
  • First release: May 26, 2023
  • Latest release: Jul 20, 2023
  • Number of updates: 5
  • Update frequency: every 12.4 days
  • Top authors: michaelprintzwarecom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /333 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-admin/includes/plugin.php+294
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory

Server metrics [RAM: ▼1.79MB] [CPU: ▼53.46ms] Passed 4 tests

An overview of server-side resources used by Official Cardzware plugin Wordpress for Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.21 ▼1.266.53 ▼34.97
Dashboard /wp-admin2.23 ▼1.086.95 ▼45.74
Posts /wp-admin/edit.php2.23 ▼1.137.08 ▼40.18
Add New Post /wp-admin/post-new.php2.23 ▼3.678.31 ▼92.93
Media Library /wp-admin/upload.php2.23 ▼1.017.59 ▼29.21

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

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

Browser metrics Passed 4 tests

Official Cardzware plugin Wordpress for Woocommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲3714.37 ▼0.042.00 ▲0.1647.74 ▲4.67
Dashboard /wp-admin2,226 ▲495.63 ▲0.1289.49 ▼1.3836.79 ▼7.55
Posts /wp-admin/edit.php2,126 ▲262.01 ▼0.0139.89 ▲3.9134.24 ▼0.24
Add New Post /wp-admin/post-new.php1,701 ▲17522.06 ▼0.98663.52 ▲2.8858.07 ▼1.20
Media Library /wp-admin/upload.php1,489 ▲864.25 ▲0.08100.80 ▲2.6844.41 ▼0.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-admin/includes/plugin.php+294
    opendir(wp-content/plugins/woocommerce): failed to open dir: No such file or directory
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

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
Even though no errors were found, 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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cardzware-greeting-cards/admin/includes/class-cardzware-greeting-cards-admin-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cardzware-greeting-cards/public/views/cardzware-greeting-cards-public-display.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cardzware-greeting-cards/public/class-cardzware-greeting-cards-public.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% 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
10 plugin tags: products, customisation, commissions, integration, celebrations...

cardzware-greeting-cards/cardzware-greeting-cards.php 92% from 13 tests

The main PHP script in "Official Cardzware plugin Wordpress for Woocommerce" version 1.0.14 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 188 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin13,685 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
CSS58106510,423
PHP315848442,872
JavaScript3410288
SVG101102

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.35
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods183
▷ Static methods6636.07%
▷ Public methods15484.15%
▷ Protected methods00.00%
▷ Private methods2915.85%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants104
▷ Global constants87.69%
▷ Class constants9692.31%
▷ Public constants7376.04%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin