10% 3dprint-lite

Code Review | 3DPrint Lite

WordPress plugin 3DPrint Lite scored 10% from 54 tests.

About plugin

  • Plugin page: 3dprint-lite
  • Plugin version: 1.9.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.9
  • WordPress version: 5.9.2
  • First release: Aug 16, 2015
  • Latest release: Mar 20, 2022
  • Number of updates: 200
  • Update frequency: every 12.0 days
  • Top authors: fuzzoid (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

600+ active / 21,471 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/3dprint-lite/includes/3dprint-lite-functions.php+825
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.46MB] [CPU: ▼292.75ms] Passed 4 tests

Analyzing server-side resources used by 3DPrint Lite
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4060.90 ▲10.96
Dashboard /wp-admin3.89 ▲0.4937.81 ▲4.00
Posts /wp-admin/edit.php4.10 ▲0.4642.76 ▲7.36
Add New Post /wp-admin/post-new.php7.71 ▲0.7291.07 ▼1,177.34
Media Library /wp-admin/upload.php3.78 ▲0.4826.93 ▼5.02
File Manager /wp-admin/admin.php?page=p3dlite_file_manager3.7327.95
Email Templates /wp-admin/admin.php?page=p3dlite_email_templates3.8731.94
Settings /wp-admin/admin.php?page=p3dlite_settings3.7431.47
Infills /wp-admin/admin.php?page=p3dlite_infills3.7327.60
3DPrint Lite /wp-admin/admin.php?page=3dprint-lite3.7429.62
Printers /wp-admin/admin.php?page=p3dlite_printers3.8231.15
Materials /wp-admin/admin.php?page=p3dlite_materials3.8331.30
Coatings /wp-admin/admin.php?page=p3dlite_coatings3.8332.29
Price Requests /wp-admin/admin.php?page=p3dlite_price_requests3.8436.34

Server storage [IO: ▲2.74MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 199 new files
Database: 4 new tables, 3 new options
New tables
wp_p3dlite_coatings
wp_p3dlite_printers
wp_p3dlite_price_requests
wp_p3dlite_materials
New WordPress options
p3dlite_version
p3dlite_settings
p3dlite_email_templates

Browser metrics Passed 4 tests

3DPrint Lite: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,066 ▲31219.47 ▲3.9145.36 ▲39.1520.54 ▲18.22
Dashboard /wp-admin2,958 ▲976.23 ▲0.08113.95 ▼15.55153.13 ▼6.98
Posts /wp-admin/edit.php2,762 ▲683.24 ▼0.1363.20 ▼0.19139.80 ▼1.53
Add New Post /wp-admin/post-new.php1,712 ▼4619.22 ▼2.22399.68 ▼38.16157.81 ▼0.25
Media Library /wp-admin/upload.php1,770 ▲695.51 ▲0.05140.48 ▲4.17185.73 ▼8.42
File Manager /wp-admin/admin.php?page=p3dlite_file_manager1,0613.1365.2997.51
Email Templates /wp-admin/admin.php?page=p3dlite_email_templates2,46711.01205.45171.83
Settings /wp-admin/admin.php?page=p3dlite_settings4,4734.74113.48157.24
Infills /wp-admin/admin.php?page=p3dlite_infills1,0713.1362.6189.93
3DPrint Lite /wp-admin/admin.php?page=3dprint-lite4,4734.76115.87150.58
Printers /wp-admin/admin.php?page=p3dlite_printers1,4683.1957.23105.36
Materials /wp-admin/admin.php?page=p3dlite_materials1,5023.2658.74107.75
Coatings /wp-admin/admin.php?page=p3dlite_coatings1,3873.2258.16102.55
Price Requests /wp-admin/admin.php?page=p3dlite_price_requests1,4263.2261.04100.53

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=3dprint-lite
    • > Network (severe)
    wp-content/plugins/3dprint-lite/images/ajax-loader-small.gif - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: 3dprint, 3dprinting, stl, 3d printing, 3d...

3dprint-lite/3dprint-lite.php Passed 13 tests

The principal PHP file in "3DPrint Lite" v. 1.9.9 is loaded by WordPress automatically on each request
42 characters long description:
A plugin for selling 3D printing services.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
It is important to fix the following items
  • Do not distribute dangerous files with your plugin
    • .xap - Silverlight Application Package in Microsoft Silverlight
      • wp-content/plugins/3dprint-lite/includes/ext/plupload/Moxie.xap
25,969 lines of code in 150 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript927,0716,50019,746
PHP251,1572,0003,533
CSS294442492,598
Markdown219056
SVG20036

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity16.62
▷ Minimum class complexity3.00
▷ Maximum class complexity30.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods88
▷ Static methods2022.73%
▷ Public methods88100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions46
▷ Named functions4597.83%
▷ Anonymous functions12.17%
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.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/ext/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
images/upload45.png0.63KB0.55KB▼ 13.58%
images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
includes/ext/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
includes/ext/easyaspie/assets/images/arrow.png1.00KB0.20KB▼ 80.56%