84% wp-paint

Code Review | WP Paint - WordPress Image Editor

WordPress plugin WP Paint - WordPress Image Editor scored84%from 54 tests.

About plugin

  • Plugin page: wp-paint
  • Plugin version: 0.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.8.3
  • WordPress version: 6.3.1
  • First release: Aug 2, 2019
  • Latest release: Jan 25, 2022
  • Number of updates: 52
  • Update frequency: every 17.4 days
  • Top authors: devadattas (65.38%)zetamatic (30.77%)pitabas106 (5.77%)kavitapatar (3.85%)

Code review

54 tests

User reviews

78 reviews

Install metrics

8,000+ active /77,130 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by WP Paint - WordPress Image Editor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.47 ▼3.96
Dashboard /wp-admin3.32 ▲0.0246.04 ▼3.07
Posts /wp-admin/edit.php3.37 ▲0.0147.06 ▼0.09
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.52 ▼11.81
Media Library /wp-admin/upload.php3.23 ▲0.0135.60 ▲4.15
Edit Image /wp-admin/admin.php?page=wp-paint-edit-image3.2130.25

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Paint - WordPress Image Editor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.73 ▼0.021.79 ▲0.0138.99 ▼5.45
Dashboard /wp-admin2,206 ▲185.02 ▲0.10108.61 ▲1.0042.37 ▲2.82
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0339.51 ▲5.0235.70 ▼2.01
Add New Post /wp-admin/post-new.php1,536 ▲1718.33 ▼5.04634.30 ▼47.4634.56 ▼10.01
Media Library /wp-admin/upload.php1,395 ▲74.34 ▲0.1399.44 ▼1.1542.52 ▼0.90
Edit Image /wp-admin/admin.php?page=wp-paint-edit-image7442.0222.2320.26

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • wp_paint_activated_on
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

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

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-paint/admin/plugin-activation-error.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: media editor, image editor, media, photo editor, image...

wp-paint/wp-paint.php 92% from 13 tests

The entry point to "WP Paint - WordPress Image Editor" version 0.5.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 244 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
Success! There were no dangerous files found in this plugin39,483 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript108,7649,03636,289
CSS7100531,888
JSON100934
PHP43943372

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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 2.64MB with 1.45MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png6.89KB3.41KB▼ 50.50%
static/images/logo-colors.png4.37KB2.39KB▼ 45.28%
static/images/sprites.png6.20KB3.92KB▼ 36.88%
assets/screenshot-2.png642.40KB194.46KB▼ 69.73%
assets/screenshot-1.png652.38KB186.12KB▼ 71.47%