78% magic-edge-lite-image-background-remover

Code Review | Magic Edge - Lite

WordPress plugin Magic Edge - Lite scored78%from 54 tests.

About plugin

  • Plugin page: magic-edge-lite-i...
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2015
  • Latest release: Mar 8, 2015
  • Number of updates: 9
  • Update frequency: every 1.3 days
  • Top authors: awssoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,962 total downloads

Benchmarks

Plugin footprint 83% 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.03MB] [CPU: ▼4.14ms] Passed 4 tests

An overview of server-side resources used by Magic Edge - Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0251.90 ▲5.70
Dashboard /wp-admin3.33 ▲0.0353.89 ▲3.48
Posts /wp-admin/edit.php3.38 ▲0.0353.64 ▼2.62
Add New Post /wp-admin/post-new.php5.91 ▲0.0389.66 ▼19.98
Media Library /wp-admin/upload.php3.26 ▲0.0340.33 ▲2.57
Magic Edge Lite /wp-admin/upload.php?page=awssoft-magic-edge-lite3.2334.34

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Magic Edge - Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▲1.192.01 ▼2.2042.84 ▼2.98
Dashboard /wp-admin2,210 ▲194.82 ▼1.07116.51 ▲10.5942.00 ▼1.61
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0944.76 ▲8.8840.45 ▲3.56
Add New Post /wp-admin/post-new.php1,536 ▲1623.18 ▲0.06676.93 ▲9.6655.48 ▲8.24
Media Library /wp-admin/upload.php1,386 ▼24.14 ▼0.0999.02 ▼11.7043.10 ▼6.93
Magic Edge Lite /wp-admin/upload.php?page=awssoft-magic-edge-lite1,4102.0959.0786.99

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

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)
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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/magic-edge-lite-image-background-remover/magic-edge-wp-lite.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/upload.php?page=awssoft-magic-edge-lite
    • > Rendering (warning) in unknown
    /wp-content/plugins/magic-edge-lite-image-background-remover/js/me.js?ver=6.3.1 2637 The specified value "undefined" cannot be parsed, or is out of range.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === magic-edge-lite-image-background-remover === )
You can look at the official readme.txt

magic-edge-lite-image-background-remover/magic-edge-wp-lite.php 92% from 13 tests

The main file in "Magic Edge - Lite" v. 1.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("magic-edge-lite-image-background-remover.php" instead of "magic-edge-wp-lite.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected4,474 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51,1592743,783
CSS31145560
PHP36510131

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
32 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/presetSettings.png4.86KB1.73KB▼ 64.34%
css/images/handIcon.png5.21KB1.66KB▼ 68.22%
css/images/resizeHorizontalOposite.png3.87KB1.15KB▼ 70.28%
css/images/previewEdgeMask.png6.05KB2.70KB▼ 55.44%
css/images/cbarrow.png4.27KB1.53KB▼ 64.28%