78% idraw

Code Review | I Draw

WordPress plugin I Draw scored 78% from 54 tests.

About plugin

  • Plugin page: idraw
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.4
  • WordPress version: 6.3.1
  • First release: Oct 5, 2012
  • Latest release: Oct 5, 2012
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: aidraw (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active / 6,031 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.25ms] Passed 4 tests

Server-side resources used by I Draw
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.50 ▼1.67
Dashboard /wp-admin3.32 ▲0.0144.10 ▼7.50
Posts /wp-admin/edit.php3.37 ▲0.0145.60 ▲1.16
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.32 ▼16.84
Media Library /wp-admin/upload.php3.24 ▲0.0130.67 ▼7.00

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for I Draw
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.27 ▼1.114.78 ▲2.9845.52 ▼3.41
Dashboard /wp-admin2,206 ▲214.86 ▼1.0498.35 ▼3.5936.42 ▼9.10
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0633.06 ▼1.1932.67 ▼0.95
Add New Post /wp-admin/post-new.php1,535 ▲1523.27 ▲0.11622.46 ▲32.5256.00 ▼0.29
Media Library /wp-admin/upload.php1,388 ▼34.15 ▼0.0494.86 ▼8.4742.68 ▼4.63

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% 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 0% 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
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/idraw/tinymce/diagram/js/idraw.php
    • > /wp-content/plugins/idraw/tinymce/idraw.php
    • > /wp-content/plugins/idraw/idraw_upload.php
  • 1× 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/idraw/idraw.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === idraw === )
  • Screenshots: Please add images for these screenshots: #1 (Button in post/page editor to activation idraw editor.), #2 (Main dialog), #3 (Sample diagram.), #4 ("New" menu.)
You can take inspiration from this readme.txt

idraw/idraw.php 92% from 13 tests

The primary PHP file in "I Draw" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 246 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,117 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS114310767
PHP46629222
JavaScript52517128

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
10 PNG files occupy 0.31MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
tinymce/diagram/images/image.png1.74KB1.52KB▼ 12.81%
screenshot-3.png82.34KB34.12KB▼ 58.56%
tinymce/diagram/images/idraw.png89.46KB30.27KB▼ 66.17%
screenshot-1.png22.81KB10.92KB▼ 52.12%
screenshot-2.png41.19KB19.27KB▼ 53.21%