67% digiwidgets-image-editor

Code Review | DigiWidgets Image Editor

WordPress plugin DigiWidgets Image Editor scored67%from 54 tests.

About plugin

  • Plugin page: digiwidgets-image...
  • Plugin version: 1.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.2.2
  • WordPress version: 6.3.1
  • First release: Feb 24, 2016
  • Latest release: Jun 29, 2019
  • Number of updates: 26
  • Update frequency: every 47.0 days
  • Top authors: kellydiek (84.62%)bnisia (19.23%)

Code review

54 tests

User reviews

8 reviews

Install metrics

600+ active /23,111 total downloads

Benchmarks

Plugin footprint 65% 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.07MB] [CPU: ▲3.42ms] Passed 4 tests

An overview of server-side resources used by DigiWidgets Image Editor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1944.47 ▲5.58
Dashboard /wp-admin3.37 ▲0.0653.12 ▲0.32
Posts /wp-admin/edit.php3.49 ▲0.1357.72 ▲7.51
Add New Post /wp-admin/post-new.php5.93 ▲0.0496.32 ▲2.38
Media Library /wp-admin/upload.php3.27 ▲0.0441.54 ▲5.38

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 77 new files
Database: 4 new tables, 7 new options
New tables
wp_fv_DigiWidgetsTemplates
wp_fv_DigiWidgetsLog
wp_fv_DigiWidgetsLogHistory
wp_fv_DigiWidgetsData
New WordPress options
theysaidso_admin_options
db_upgraded
digiwidgets_fv_jal_db_version
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

DigiWidgets Image Editor: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲23414.67 ▲0.361.74 ▲0.0439.91 ▼2.05
Dashboard /wp-admin2,335 ▲1446.35 ▲1.47114.56 ▼1.0678.31 ▲36.55
Posts /wp-admin/edit.php2,255 ▲1663.26 ▲1.2349.18 ▲11.9165.44 ▲29.29
Add New Post /wp-admin/post-new.php1,526 ▼1023.19 ▼0.07608.44 ▼27.5335.30 ▼15.15
Media Library /wp-admin/upload.php1,389 ▼24.11 ▼0.1977.85 ▼19.7378.96 ▲35.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables were found after uninstall: 4 tables
    • wp_fv_DigiWidgetsTemplates
    • wp_fv_DigiWidgetsLogHistory
    • wp_fv_DigiWidgetsData
    • wp_fv_DigiWidgetsLog
  • Zombie WordPress options were found after uninstall: 7 options
    • digiwidgets_fv_jal_db_version
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/digiwidgets-image-editor/digiwidgets-image-editor.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > 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/digiwidgets-image-editor/digiwidgets/templateChooseEditor.php on line 4
    • > 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/digiwidgets-image-editor/digiwidgets/templateChooseEditor.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_register_script() in wp-content/plugins/digiwidgets-image-editor/digiwidgets/imageEditor.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/digiwidgets-image-editor/digiwidgets/templateChooseEditor.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Image templates are what WordPress has been missing! Have you ever had a client add an image to a site that was WAY too big, broke the layout, and then blame it on you? Or add a vertical image to a content slider and wonder why it’s so distorted? Clients want to be able to update images themselves. Designers don’t want to waste their time fixing what their clients break. Wordpress image editor templates are your solution.), #2 (Yes layers – like in Photoshop! Move layers up and down using tools or drag the thumbnails in the order you want them. Make a photo collage, add a logo to a t-shirt, add your pic to a beach background and pretend you’re there… With the WordPress image editor, the options are endless.), #3 (Ever wanted to ‘undo’ all the way to the beginning of a project? With Digiwidgets WordPress image editor, you can! Our ‘History’ tab tracks and time-stamps every edit over the life of a project (even beyond your last save), so you can undo to your heart’s content!), #4 (Sick of using the gold standard web-safe fonts offered on every other image-editor? Digiwidgets integrates with Google fonts for a vast assortment of awesome fonts that will thrill your right brain.), #5 (Cropping. Pretty boring feature, right? How about circle crop? Little better, eh? How about cropping multiple images within the same canvas? Now we’re talkin’. Easily create photo collages that perfectly fill your header space or blog post. Delicious.), #6 (Filters galore! From grayscale and sepia to brightness and contrast. From sharpen or blur to multiply and transparency. Even a ‘remove white background’ filter! Now that’s the coolest thing since… that history feature we just talked about.)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === digiwidgets-image-editor === )
You can look at the official readme.txt

digiwidgets-image-editor/digiwidgets-image-editor.php 92% from 13 tests

The primary PHP file in "DigiWidgets Image Editor" version 1.10 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 168 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 detected9,376 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript178768515,966
CSS82341022,064
PHP181302281,346

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity14.75
▷ Minimum class complexity6.00
▷ Maximum class complexity23.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
28 PNG files occupy 0.67MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png142.47KB52.05KB▼ 63.47%
digiwidgets/libs/jquery/images/ui-bg_flat_75_ffffff_40x100.png0.24KB0.08KB▼ 64.78%
digiwidgets/libs/images/moreFilters.png3.72KB2.15KB▼ 42.28%
digiwidgets/libs/images/upgradePro.png6.56KB3.10KB▼ 52.78%
digiwidgets/libs/images/circle.png1.13KB0.28KB▼ 75.39%