94% free-canvas

Code Review | Free Canvas

WordPress plugin Free Canvas scored 94% from 54 tests.

About plugin

  • Plugin page: free-canvas
  • Plugin version: 1.10
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 5.9.2
  • First release: Feb 4, 2020
  • Latest release: Oct 26, 2021
  • Number of updates: 28
  • Update frequency: every 22.5 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 892 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼297.64ms] Passed 4 tests

A check of server-side resources used by Free Canvas
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0751.74 ▼2.00
Dashboard /wp-admin3.48 ▲0.0733.76 ▼0.32
Posts /wp-admin/edit.php3.71 ▲0.0738.36 ▲1.30
Add New Post /wp-admin/post-new.php6.94 ▼0.0394.59 ▼1,189.31
Media Library /wp-admin/upload.php3.36 ▲0.0625.43 ▲1.08
Free Canvas /wp-admin/options-general.php?page=freecanvas3.3322.20

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Free Canvas: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,790 ▲3615.94 ▲0.687.07 ▲1.052.95 ▲0.51
Dashboard /wp-admin2,897 ▲396.03 ▼0.19116.43 ▼16.98156.76 ▼6.01
Posts /wp-admin/edit.php2,696 ▲53.24 ▲0.0165.89 ▲0.59139.65 ▼4.17
Add New Post /wp-admin/post-new.php1,699 ▲3821.13 ▲5.07421.04 ▼8.34157.52 ▲0.98
Media Library /wp-admin/upload.php1,700 ▲55.51 ▼0.02149.15 ▼3.15187.87 ▼0.84
Free Canvas /wp-admin/options-general.php?page=freecanvas1,4132.4954.21124.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 4× 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/free-canvas/lib/class-freecanvasadmin.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/free-canvas/lib/class-freecanvasajax.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/free-canvas/lib/class-freecanvas.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/free-canvas/lib/class-freecanvas.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: canvas, handwriting

free-canvas/freecanvas.php 92% from 13 tests

The main PHP file in "Free Canvas" ver. 1.10 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("free-canvas.php" instead of "freecanvas.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
Everything looks great! No dangerous files found in this plugin488 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP469146341
JavaScript22140147

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.33
▷ Minimum class complexity7.00
▷ Maximum class complexity14.00
Average method complexity4.44
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected