83% artidomo-print-on-demand

Code Review | artidomo print on-demand

WordPress plugin artidomo print on-demand scored83%from 54 tests.

About plugin

  • Plugin page: artidomo-print-on...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 9, 2022
  • Latest release: Aug 9, 2022
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: artidomo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /347 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▲1.76ms] 75% from 4 tests

An overview of server-side resources used by artidomo print on-demand
The following require your attention
  • CPU: Try to keep total CPU usage under 500.00ms (currently 2,441.74ms on /wp-admin/admin.php?page=products_mapping_list)
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2939.02 ▼0.99
Dashboard /wp-admin3.60 ▲0.2950.88 ▲5.49
Posts /wp-admin/edit.php3.71 ▲0.3550.21 ▲3.85
Add New Post /wp-admin/post-new.php6.20 ▲0.3194.51 ▲5.79
Media Library /wp-admin/upload.php3.52 ▲0.2932.89 ▼1.33
Help /wp-admin/admin.php?page=artidomo_help3.4933.30
Settings /wp-admin/admin.php?page=settings3.5333.63
New Mapping /wp-admin/admin.php?page=new_mapping3.752,622.38
Products Mapping list /wp-admin/admin.php?page=products_mapping_list3.542,441.74

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

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

Browser metrics Passed 4 tests

artidomo print on-demand: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲17913.85 ▼0.534.86 ▲3.0640.75 ▼2.12
Dashboard /wp-admin2,245 ▲575.23 ▲0.12111.10 ▲13.2740.58 ▼3.14
Posts /wp-admin/edit.php2,131 ▲422.47 ▲0.4541.49 ▲5.8136.88 ▲0.23
Add New Post /wp-admin/post-new.php1,559 ▲4518.53 ▲1.00617.91 ▼26.3565.14 ▲20.15
Media Library /wp-admin/upload.php1,424 ▲424.45 ▲0.2699.10 ▼29.5341.58 ▼9.62
Help /wp-admin/admin.php?page=artidomo_help9051.8129.9238.71
Settings /wp-admin/admin.php?page=settings9021.9025.8527.72
New Mapping /wp-admin/admin.php?page=new_mapping1,2572.1932.5037.63
Products Mapping list /wp-admin/admin.php?page=products_mapping_list8861.8525.7127.01

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% 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
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=new_mapping
    • > Notice in wp-content/plugins/artidomo-print-on-demand/admin/partials/artidomo-new-mapping-settings.php+225
    Trying to get property 'term_id' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=new_mapping
    • > Notice in wp-content/plugins/artidomo-print-on-demand/admin/partials/artidomo-new-mapping-settings.php+225
    Trying to get property 'name' of non-object
    • > GET request to /wp-admin/admin.php?page=new_mapping
    • > Notice in wp-content/plugins/artidomo-print-on-demand/admin/partials/artidomo-new-mapping-settings.php+238
    Undefined property: stdClass::$categories
    • > GET request to /wp-admin/admin.php?page=new_mapping
    • > Notice in wp-content/plugins/artidomo-print-on-demand/admin/partials/artidomo-new-mapping-settings.php+258
    Undefined property: stdClass::$smalllengths
    • > GET request to /wp-admin/admin.php?page=new_mapping
    • > Notice in wp-content/plugins/artidomo-print-on-demand/admin/partials/artidomo-new-mapping-settings.php+272
    Undefined property: stdClass::$largelengths
    • > GET request to /wp-admin/admin.php?page=new_mapping
    • > Notice in wp-content/plugins/artidomo-print-on-demand/admin/partials/artidomo-new-mapping-settings.php+291
    Undefined variable: post_ID
    • > GET request to /wp-admin/admin.php?page=new_mapping
    • > Notice in wp-content/plugins/artidomo-print-on-demand/admin/partials/artidomo-new-mapping-settings.php+302
    Undefined index: edit

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Donate link: Invalid URI found ("www.artidomo.eu")
  • Tags: Please reduce the number of tags, currently 40 tag instead of maximum 10
The official readme.txt is a good inspiration

artidomo-print-on-demand/artidomo-print.php 92% from 13 tests

The principal PHP file in "artidomo print on-demand" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("artidomo-print-on-demand.php" instead of "artidomo-print.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin2,576 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP152715291,896
JavaScript3855328
PO File184103213
CSS358139

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.39
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods48
▷ Static methods24.17%
▷ Public methods4389.58%
▷ Protected methods00.00%
▷ Private methods510.42%
Functions13
▷ Named functions13100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.62MB with 0.40MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png147.39KB49.32KB▼ 66.54%
assets/icon-256x256.png23.31KB8.62KB▼ 63.03%
assets/banner-1544x500.png468.81KB167.94KB▼ 64.18%