73% wopo-paint

Code Review | WoPo Paint

WordPress plugin WoPo Paint scored73%from 54 tests.

About plugin

  • Plugin page: wopo-paint
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Apr 24, 2020
  • Latest release: Aug 10, 2023
  • Number of updates: 10
  • Update frequency: every 120.4 days
  • Top authors: thanhbinh8703 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,141 total downloads

Benchmarks

Plugin footprint 82% 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.02MB] [CPU: ▼6.15ms] Passed 4 tests

An overview of server-side resources used by WoPo Paint
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0244.92 ▲0.22
Dashboard /wp-admin3.33 ▲0.0251.29 ▲1.21
Posts /wp-admin/edit.php3.38 ▲0.0246.07 ▼6.30
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.08 ▼11.51
Media Library /wp-admin/upload.php3.25 ▲0.0230.16 ▼7.00

Server storage [IO: ▲36.90MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
It is recommended to fix the following issues
  • Total filesystem usage must be limited to 25MB (currently using 36.90MB)
Filesystem: 2,729 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

WoPo Paint: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.281.79 ▼0.0843.01 ▲1.04
Dashboard /wp-admin2,198 ▲185.62 ▼0.0298.29 ▲1.8241.37 ▼2.59
Posts /wp-admin/edit.php2,097 ▼31.99 ▼0.0434.90 ▼4.0733.96 ▲0.26
Add New Post /wp-admin/post-new.php1,623 ▲9521.82 ▼1.32643.49 ▼72.2536.02 ▼30.00
Media Library /wp-admin/upload.php1,990 ▲5934.36 ▲0.1599.03 ▼20.4263.76 ▲14.24

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wopo-paint/wopo-paint.php:43

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

wopo-paint/wopo-paint.php 77% from 13 tests

Analyzing the main PHP file in "WoPo Paint" version 1.2.0
Please make the necessary changes and fix the following:
  • Requires PHP: Required version must match the one declared in readme.txt ("5.2.4" instead of "7.1")
  • Domain Path: The domain path folder does not exist ("/languages")
  • Requires at least: Required version must match the one declared in readme.txt ("4.6" instead of "5.2")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Almost there! Just fix the following issues
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bin - Binary Executable in Windows, macOS, Linux
      • wp-content/plugins/wopo-paint/editor/lib/tracky-mouse/lib/facemesh/facemesh/group1-shard1of1.bin
      • wp-content/plugins/wopo-paint/editor/lib/tracky-mouse/lib/facemesh/blazeface/group1-shard1of1.bin
    • .ahk - AutoHotkey Script in AutoHotkey
      • wp-content/plugins/wopo-paint/editor/help/prettify-html.ahk
272,336 lines of code in 263 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript10436,57040,316209,736
JSON140045,881
CSS269801,7157,811
SVG6515665,497
HTML42821292,029
Markdown52790886
Bourne Shell235156335
PHP1122787
AutoHotkey131353
YAML20419
XML1002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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 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

PNG files should be compressed to save space and minimize bandwidth usage
142 PNG files occupy 1.24MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
editor/lib/tracky-mouse/images/tracky-mouse-logo-16.png0.32KB0.29KB▼ 9.39%
editor/help/p_fliph.png0.16KB0.13KB▼ 20.86%
editor/images/warning-16x16-8bpp.png0.41KB0.18KB▼ 56.83%
editor/help/p_database.png0.14KB0.11KB▼ 21.28%
editor/images/icons/ms-icon-70x70.png5.27KB2.66KB▼ 49.57%