67% print-science-designer

Code Review | Print Science Designer

WordPress plugin Print Science Designer scored67%from 54 tests.

About plugin

  • Plugin page: print-science-des...
  • Plugin version: 1.3.141
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1
  • WordPress version: 6.3.1
  • First release: Oct 3, 2014
  • Latest release: Oct 19, 2023
  • Number of updates: 354
  • Update frequency: every 9.9 days
  • Top authors: johnwwweissberg (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active /18,706 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.26MB] [CPU: ▼19.59ms] Passed 4 tests

Analyzing server-side resources used by Print Science Designer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0934.06 ▼14.16
Dashboard /wp-admin3.36 ▲0.0149.10 ▼14.69
Posts /wp-admin/edit.php3.38 ▲0.0247.36 ▼0.78
Add New Post /wp-admin/post-new.php4.72 ▼1.1649.47 ▼48.73
Media Library /wp-admin/upload.php3.35 ▲0.1243.46 ▲2.46

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 73 new files
Database: 3 new tables, 10 new options
New tables
wp_api_info
wp_saved_projects
wp_cart_data
New WordPress options
personalize_clear_date
my_admin_errors
widget_theysaidso_widget
can_compress_scripts
db_upgraded
personalize_version
recovery_mode_email_last_sent
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Print Science Designer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,430 ▼1,3313.35 ▼11.000.28 ▼1.788.45 ▼34.64
Dashboard /wp-admin1,262 ▼9181.36 ▼4.2613.56 ▼79.5437.28 ▼5.40
Posts /wp-admin/edit.php1,107 ▼9931.12 ▼0.847.93 ▼37.2628.82 ▼4.89
Add New Post /wp-admin/post-new.php45 ▼1,4830.42 ▼22.640.10 ▼690.7810.81 ▼40.98
Media Library /wp-admin/upload.php1,399 ▼14.18 ▼0.01109.70 ▼3.4281.31 ▲31.85
Personalization API /wp-admin/personalize.php260.420.1114.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_cart_data
    • wp_api_info
    • wp_saved_projects
  • This plugin does not fully uninstall, leaving 10 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • personalize_version
    • personalize_clear_date
    • widget_theysaidso_widget
    • my_admin_errors
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/print-science-designer/includes/shortcodes.php:2
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/print-science-designer/personalize.php on line 15
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/print-science-designer/includes/admin.php on line 65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/print-science-designer/includes/saved-projects.php:74
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/print-science-designer/personalize.php on line 15
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/print-science-designer/personalize.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/print-science-designer/personalize.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/print-science-designer/includes/woo.php:19
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/print-science-designer/includes/admin.php:65
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/print-science-designer/includes/functions.php:105

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/personalize.php
    • > Network (severe)
    wp-admin/personalize.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #3, #4 in print-science-designer/assets to your readme.txt
  • Plugin Name: You should set the name of your plugin on the first line ( === print-science-designer === )
The official readme.txt is a good inspiration

print-science-designer/personalize.php 85% from 13 tests

The main file in "Print Science Designer" v. 1.3.141 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:
  • 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: The principal plugin file should be the same as the plugin slug ("print-science-designer.php" instead of "personalize.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected8,724 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP104261,0595,728
PO File75553571,316
JavaScript1076341,200
CSS5194480

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions108
▷ Named functions108100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
25 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/colorpicker_overlay.png10.11KB8.24KB▼ 18.50%
images/help.png0.30KB0.32KB0.00%
images/custom_hsb_b.png1.07KB0.82KB▼ 23.61%
images/colorpicker_rgb_r.png1.04KB0.77KB▼ 26.17%
images/select.png0.49KB0.33KB▼ 33.40%