77% canvasflow

Code Review | Canvasflow for WordPress

WordPress plugin Canvasflow for WordPress scored 77% from 54 tests.

About plugin

  • Plugin page: canvasflow
  • Plugin version: 1.5.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.4.1
  • WordPress version: 5.9.2
  • First release: Jul 19, 2017
  • Latest release: May 12, 2020
  • Number of updates: 43
  • Update frequency: every 23.9 days
  • Top authors: canvasflow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 945 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼306.73ms] Passed 4 tests

A check of server-side resources used by Canvasflow for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0255.70 ▲4.60
Dashboard /wp-admin3.43 ▲0.0332.56 ▼0.78
Posts /wp-admin/edit.php3.66 ▲0.0236.65 ▼0.20
Add New Post /wp-admin/post-new.php6.94 ▼0.06103.33 ▼1,226.03
Media Library /wp-admin/upload.php3.31 ▲0.0225.05 ▲0.10
Settings /wp-admin/admin.php?page=canvasflow-settings3.4727.16
Upload Manager /wp-admin/admin.php?page=wp-canvasflow-plugin3.3625.17
Posts Manager /wp-admin/admin.php?page=canvasflow-posts-manager3.4529.95

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 17 new files
Database: 3 new tables, 1 new option
New tables
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Canvasflow for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,799 ▲5715.37 ▼0.206.87 ▲0.742.40 ▲0.33
Dashboard /wp-admin2,927 ▲695.97 ▼0.24119.41 ▼14.94176.94 ▲20.33
Posts /wp-admin/edit.php2,743 ▲493.24 ▲0.0162.73 ▲0.44140.89 ▼0.14
Add New Post /wp-admin/post-new.php1,770 ▲1821.93 ▲1.05423.24 ▼20.65199.15 ▲49.21
Media Library /wp-admin/upload.php1,727 ▲245.54 ▼0.03133.54 ▼0.06223.50 ▲36.95
Settings /wp-admin/admin.php?page=canvasflow-settings1,0652.3851.83114.44
Upload Manager /wp-admin/admin.php?page=wp-canvasflow-plugin9962.3953.04103.49
Posts Manager /wp-admin/admin.php?page=canvasflow-posts-manager1,4972.3853.99138.95

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
  • This plugin does not fully uninstall, leaving 1 option in the database
    • category_children

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/canvasflow/includes/views/canvasflow-main-view.php
    • > /wp-content/plugins/canvasflow/includes/views/canvasflow-post-manager-view.php
  • 77× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: search in wp-content/plugins/canvasflow/includes/views/canvasflow-post-manager-view.php on line 124
    • > PHP Notice
      Undefined variable: order in wp-content/plugins/canvasflow/includes/views/canvasflow-main-view.php on line 54
    • > PHP Notice
      Undefined variable: search in wp-content/plugins/canvasflow/includes/views/canvasflow-main-view.php on line 165
    • > PHP Notice
      Undefined variable: order in wp-content/plugins/canvasflow/includes/views/canvasflow-main-view.php on line 92
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/canvasflow/includes/views/canvasflow-settings-view.php:10
    • > PHP Notice
      Undefined index: wpdb in wp-content/plugins/canvasflow/includes/canvasflow-shortcodes.php on line 8
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/canvasflow/includes/views/canvasflow-metabox-view.php on line 4
    • > PHP Notice
      Undefined variable: order_by in wp-content/plugins/canvasflow/includes/views/canvasflow-main-view.php on line 131
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Canvasflow' not found in wp-content/plugins/canvasflow/includes/canvasflow-main.php:2
    • > PHP Notice
      Undefined variable: page in wp-content/plugins/canvasflow/includes/views/canvasflow-main-view.php on line 379

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Manage all of your posts in Canvasflow from your WordPress dashboard), #2 (Easily select which posts are eligible for upload to your Canvasflow publication), #3 (Override the style an article inherits on a per upload basis.), #4 (Real time sync status manages and notifies you of all content changes), #5 (Customise the plugin to match your workflow.)
The official readme.txt is a good inspiration

canvasflow/canvasflow-plugin.php 85% from 13 tests

The entry point to "Canvasflow for WordPress" version 1.5.5 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("canvasflow.php" instead of "canvasflow-plugin.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
There were no executable files found in this plugin3,813 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity32.25
▷ Minimum class complexity8.00
▷ Maximum class complexity106.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods9184.26%
▷ Protected methods00.00%
▷ Private methods1715.74%
▷ Named functions7100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/favicon.png0.90KB0.57KB▼ 36.97%