68% canva

Code Review | Canva - Design beautiful blog graphics

WordPress plugin Canva - Design beautiful blog graphics scored 68% from 54 tests.

About plugin

  • Plugin page: canva
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.5
  • WordPress version: 5.8.1
  • First release: Jul 21, 2014
  • Latest release: Sep 6, 2016
  • Number of updates: 22
  • Update frequency: every 35.5 days
  • Top authors: Canva (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

2,000+ active / 29,196 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.19MB] [CPU: ▼131.61ms] Passed 4 tests

An overview of server-side resources used by Canva - Design beautiful blog graphics
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.14 ▲0.3042.03 ▲17.94
Dashboard /wp-admin3.25 ▲0.1953.62 ▲7.06
Posts /wp-admin/edit.php3.34 ▲0.2356.12 ▲8.11
Add New Post /wp-admin/post-new.php5.59 ▲0.16106.16 ▼549.99
Media Library /wp-admin/upload.php3.16 ▲0.1642.77 ▲8.39
Canva /wp-admin/admin.php?page=canva_settings3.1436.73
Canva Database /wp-admin/admin.php?page=sub-page3.1439.77

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Canva - Design beautiful blog graphics
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,837 ▲24117.26 ▲1.678.33 ▼3.4853.56 ▲3.60
Dashboard /wp-admin3,082 ▲1517.68 ▲1.60157.64 ▲4.81127.12 ▲15.68
Posts /wp-admin/edit.php2,886 ▲1473.81 ▲1.1285.67 ▲16.13122.94 ▲19.61
Add New Post /wp-admin/post-new.php1,721 ▲21917.16 ▼1.43339.59 ▼48.05112.95 ▲2.49
Media Library /wp-admin/upload.php1,797 ▼104.81 ▼0.21117.36 ▼38.65136.86 ▲16.19
Canva /wp-admin/admin.php?page=canva_settings1,3103.2869.3881.73
Canva Database /wp-admin/admin.php?page=sub-page1,3983.3075.7385.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_canva_images
  • Zombie WordPress options were found after uninstall: 4 options
    • canva_init
    • canva_api_key
    • canva_design_type
    • canva_database_table

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'canvaDatabase' not found in wp-content/plugins/canva/inc/media.php:43
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/canva/inc/canvaDatabaseTableDisplay.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/canva/canva.php:37
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/canva/inc/canvaDatabaseTableDisplay.php on line 15
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/canva/inc/canvaDatabaseTableDisplay.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/canva/screens/config.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sub-page
    • > Network (severe)
    https://sdk.canva.com/v1/api.js - Failed to load resource: the server responded with a status of 403 ()


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
1 plugin tags: canva

canva/canva.php 92% from 13 tests

"Canva - Design beautiful blog graphics" version 1.2.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 161 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,112 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity19.33
▷ Minimum class complexity10.00
▷ Maximum class complexity38.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods48100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
13 PNG files occupy 0.86MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/canva-icon_20x20_sat.png2.00KB0.96KB▼ 51.97%
images/canva-icon_20x20.png2.15KB1.12KB▼ 47.80%
images/canva-icon_34x34_sat.png3.02KB1.55KB▼ 48.67%
images/canva-icon_32x32_sat.png2.40KB1.39KB▼ 42.17%
images/canva-icon_34x34.png3.25KB1.67KB▼ 48.42%