72% clip-path-maker

Code Review | Clip Path Maker

WordPress plugin Clip Path Maker scored72%from 54 tests.

About plugin

  • Plugin page: clip-path-maker
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Jun 9, 2022
  • Latest release: Jun 9, 2022
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: vikasratudi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /480 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
Installer ran successfully

Server metrics [RAM: ▼0.22MB] [CPU: ▼17.17ms] Passed 4 tests

This is a short check of server-side resources used by Clip Path Maker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.41 ▼1.50
Dashboard /wp-admin3.08 ▼0.2326.32 ▼26.19
Posts /wp-admin/edit.php3.22 ▼0.1435.11 ▼14.89
Add New Post /wp-admin/post-new.php5.46 ▼0.4371.75 ▼20.52
Media Library /wp-admin/upload.php3.16 ▼0.0727.95 ▼7.06
Clip Path Maker /wp-admin/admin.php?page=clippathmaker3.0624.90
More /wp-admin/admin.php?page=clippathmaker-more3.0624.36

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Clip Path Maker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.26 ▼0.011.90 ▲0.1337.71 ▼3.72
Dashboard /wp-admin2,222 ▲455.58 ▼0.0990.91 ▲5.1638.36 ▼2.69
Posts /wp-admin/edit.php2,124 ▲242.01 ▲0.0738.80 ▼1.0035.49 ▼1.70
Add New Post /wp-admin/post-new.php1,551 ▲1623.36 ▲5.34647.83 ▼11.2551.89 ▼16.74
Media Library /wp-admin/upload.php1,430 ▲274.24 ▲0.1098.46 ▼5.9640.99 ▼8.08
Clip Path Maker /wp-admin/admin.php?page=clippathmaker1,7802.7961.1843.80
More /wp-admin/admin.php?page=clippathmaker-more8691.9625.1730.07

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=clippathmaker-more
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

SRP 0% 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 take a closer look at the following
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/clip-path-maker/uninstall.php
    • > /wp-content/plugins/clip-path-maker/inc/clippathmaker-cmsoon.php
    • > /wp-content/plugins/clip-path-maker/clippathmaker.php
    • > /wp-content/plugins/clip-path-maker/inc/db.php
    • > /wp-content/plugins/clip-path-maker/inc/clippathmaker-structure.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant VFCPM_PLUGIN_URL - assumed 'VFCPM_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/clip-path-maker/inc/clippathmaker-structure.php on line 397
    • > PHP Warning
      Use of undefined constant VFCPM_PLUGIN_URL - assumed 'VFCPM_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/clip-path-maker/inc/clippathmaker-structure.php on line 396
    • > PHP Warning
      Use of undefined constant VFCPM_PLUGIN_URL - assumed 'VFCPM_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/clip-path-maker/inc/clippathmaker-structure.php on line 390
    • > PHP Warning
      Use of undefined constant VFCPM_PLUGIN_URL - assumed 'VFCPM_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/clip-path-maker/inc/clippathmaker-structure.php on line 398
    • > PHP Warning
      Use of undefined constant VFCPM_PLUGIN_URL - assumed 'VFCPM_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/clip-path-maker/inc/clippathmaker-structure.php on line 399

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Please fix the following attributes:
  • Contributors: Plugin contributors not specified
  • Screenshots: Please a description for screenshot #5 in clip-path-maker/assets to your readme.txt
Please take inspiration from this readme.txt

clip-path-maker/clippathmaker.php 85% from 13 tests

The main PHP script in "Clip Path Maker" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("clip-path-maker.php" instead of "clippathmaker.php")

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
Success! There were no dangerous files found in this plugin4,077 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS226442,171
JavaScript32401821,404
PHP62622502

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin