83% camaloon-print-on-demand

Code Review | Camaloon Integration for WooCommerce

WordPress plugin Camaloon Integration for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: camaloon-print-on...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 22, 2021
  • Latest release: Sep 23, 2022
  • Number of updates: 13
  • Update frequency: every 25.9 days
  • Top authors: camaloon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /441 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.06ms] Passed 4 tests

This is a short check of server-side resources used by Camaloon Integration for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0548.28 ▲8.32
Dashboard /wp-admin3.35 ▲0.0546.76 ▼3.61
Posts /wp-admin/edit.php3.46 ▲0.1143.67 ▼2.89
Add New Post /wp-admin/post-new.php5.95 ▲0.0780.51 ▼10.33
Media Library /wp-admin/upload.php3.27 ▲0.0534.86 ▲0.61

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 46 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Camaloon Integration for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9213.32 ▼1.441.73 ▼0.1043.86 ▼1.06
Dashboard /wp-admin2,247 ▲656.00 ▲0.1597.26 ▼1.3975.72 ▲28.51
Posts /wp-admin/edit.php2,130 ▲412.01 ▲0.0134.65 ▼2.4627.28 ▼8.98
Add New Post /wp-admin/post-new.php1,394 ▼13918.91 ▼4.35589.86 ▼106.5631.72 ▼39.15
Media Library /wp-admin/upload.php1,429 ▲414.17 ▲0.0297.49 ▼15.4879.45 ▲32.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/camaloon-print-on-demand/camaloon.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function camaloon_is_woocommerce_ready() in wp-content/plugins/camaloon-print-on-demand/includes/templates/connect.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/camaloon-print-on-demand/includes/templates/status.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Camaloon_Client' not found in wp-content/plugins/camaloon-print-on-demand/includes/templates/disconnect.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/camaloon-print-on-demand/includes/camaloon-functions.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Camaloon_Client' not found in wp-content/plugins/camaloon-print-on-demand/includes/templates/camaloon-home.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Camaloon_Client' not found in wp-content/plugins/camaloon-print-on-demand/includes/templates/faq.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #4, #5 in camaloon-print-on-demand/assets to your readme.txt
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can look at the official readme.txt

camaloon-print-on-demand/camaloon.php 85% from 13 tests

The principal PHP file in "Camaloon Integration for WooCommerce" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("camaloon-print-on-demand.php" instead of "camaloon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected2,929 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PO File135725721,716
CSS4105219630
PHP881291555
SVG20019
JavaScript3229

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.30
Average class complexity3.67
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/camaloon-logo.png1.74KB1.67KB▼ 4.37%