67% pixter-image-digital-license

Code Review | Image License and Protection

WordPress plugin Image License and Protection scored67%from 54 tests.

About plugin

  • Plugin page: pixter-image-digi...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Dec 15, 2016
  • Latest release: Dec 15, 2016
  • Number of updates: 5
  • Update frequency: every 2.2 days
  • Top authors: itayamar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,235 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.94MB] [CPU: ▼39.49ms] Passed 4 tests

Analyzing server-side resources used by Image License and Protection
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5840.96 ▲1.23
Dashboard /wp-admin3.00 ▼0.3015.82 ▼31.71
Posts /wp-admin/edit.php3.00 ▼0.3511.58 ▼33.57
Add New Post /wp-admin/post-new.php3.00 ▼2.8811.88 ▼71.87
Media Library /wp-admin/upload.php3.00 ▼0.2312.24 ▼20.79
Image License and Protection /wp-admin/admin.php?page=pixter_image_digital_license_plugin3.0011.10

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 68 new files
Database: no new tables, 14 new options
New WordPress options
pixter_image_digital_license_ver
pixter_image_digital_license_v3_user
pixter_image_digital_license_user
db_upgraded
can_compress_scripts
pixter_image_digital_license_options
widget_recent-comments
pixter_image_digital_license_db_ver
widget_theysaidso_widget
pixter_image_digital_license_uid
...

Browser metrics Passed 4 tests

Checking browser requirements for Image License and Protection
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲8413.23 ▼1.351.88 ▼0.3042.68 ▼2.27
Dashboard /wp-admin2,237 ▲494.88 ▼0.9197.02 ▼18.7181.23 ▲34.29
Posts /wp-admin/edit.php2,116 ▲272.05 ▲0.0434.16 ▼4.8733.05 ▼1.18
Add New Post /wp-admin/post-new.php1,545 ▲2623.42 ▲0.27705.53 ▲21.6558.32 ▲0.62
Media Library /wp-admin/upload.php1,410 ▲194.14 ▼0.06106.56 ▲9.9778.95 ▲32.51
Image License and Protection /wp-admin/admin.php?page=pixter_image_digital_license_plugin1,3702.8057.2140.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the pixter-me-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 11 options
    • pixter_image_digital_license_ver
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • p1xtr_uid
    • pixter_image_digital_license_db_ver
    • widget_theysaidso_widget
    • pixter_image_digital_license_uid
    • theysaidso_admin_options
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=pixter_image_digital_license_plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the pixter-me-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pixter_image_digital_license_plugin
    • > Notice in wp-content/plugins/pixter-image-digital-license/admin-page-class/admin-page-class.php+1658
    Undefined index: fields
    • > GET request to /wp-admin/admin.php?page=pixter_image_digital_license_plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function get_bloginfo was called with an argument that is deprecated since version 2.2.0! The siteurl option is deprecated for the family of bloginfo() functions. Use the url option instead.
    • > GET request to /wp-admin/admin.php?page=pixter_image_digital_license_plugin
    • > Notice in wp-content/plugins/pixter-image-digital-license/admin-page-class/admin-page-class.php+1645
    Undefined index: show_pages
    • > GET request to /wp-admin/admin.php?page=pixter_image_digital_license_plugin
    • > Notice in wp-content/plugins/pixter-image-digital-license/admin-page-class/admin-page-class.php+1645
    Undefined index: show_posts

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just 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 __() in wp-content/plugins/pixter-image-digital-license/admin_functions.php:153

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 86% from 29 tests

readme.txt 94% 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
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt might help

pixter-image-digital-license/pixter_image_digital_license.php 77% from 13 tests

The main PHP file in "Image License and Protection" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 309 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pixter-image-digital-license.php" instead of "pixter_image_digital_license.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected12,833 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript139589787,670
PHP74811,4092,585
CSS93032411,919
PO File4276352659

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity199.00
▷ Minimum class complexity25.00
▷ Maximum class complexity373.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods130
▷ Static methods00.00%
▷ Public methods12696.92%
▷ Protected methods00.00%
▷ Private methods43.08%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
25 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin-page-class/js/FancyCheckbox/images/iphone.png6.26KB2.56KB▼ 59.13%
admin-icon.png0.76KB0.77KB0.00%
admin-page-class/images/add.png1.84KB1.49KB▼ 19.11%
admin-page-class/js/select2/select2.png0.60KB0.99KB0.00%
admin-page-class/css/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%