68% pitchprint

Code Review | PitchPrint

WordPress plugin PitchPrint scored68%from 54 tests.

About plugin

  • Plugin page: pitchprint
  • Plugin version: 10.1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3
  • WordPress version: 6.3.1
  • First release: Jul 21, 2014
  • Latest release: Nov 17, 2023
  • Number of updates: 183
  • Update frequency: every 18.6 days
  • Top authors: flexcubed (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

500+ active /35,653 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.67ms] Passed 4 tests

This is a short check of server-side resources used by PitchPrint
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1935.37 ▼3.93
Dashboard /wp-admin3.34 ▲0.0343.51 ▼6.35
Posts /wp-admin/edit.php3.39 ▲0.0345.20 ▼1.81
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.18 ▲5.47
Media Library /wp-admin/upload.php3.26 ▲0.0331.49 ▼2.58

Server storage [IO: ▲0.52MB] [DB: ▲0.07MB] 67% from 3 tests

Input-output and database impact of this plugin
Just a few items left to fix
  • You have illegally modified 2 files (2.08KB) outside of "wp-content/plugins/pitchprint/" and "wp-content/uploads/"
    • (new file) pitchprint/app/getProdDesigns.php
    • (new file) pitchprint/app/saveproject.php
Filesystem: 68 new files
Database: 1 new table, 7 new options
New tables
wp_pitchprint_projects
New WordPress options
pitchprint_version
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

PitchPrint: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7414.15 ▼0.191.65 ▼0.0239.90 ▼5.08
Dashboard /wp-admin2,223 ▲435.63 ▲0.0487.82 ▼3.2137.45 ▼6.48
Posts /wp-admin/edit.php2,131 ▲311.99 ▼0.0240.53 ▼1.3834.16 ▼1.25
Add New Post /wp-admin/post-new.php1,539 ▲1322.70 ▼0.38593.28 ▼3.0661.41 ▼0.35
Media Library /wp-admin/upload.php1,431 ▲284.20 ▲0.0696.63 ▼2.6741.92 ▼1.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_pitchprint_projects
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • pitchprint_version
    • widget_theysaidso_widget
    • widget_recent-posts

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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/pitchprint/uploader/index.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      require_once(../../wp-load.php): failed to open stream: No such file or directory in wp-content/plugins/pitchprint/app/getProdDesigns.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required '../../wp-load.php' (include_path='.:/usr/share/php') in wp-content/plugins/pitchprint/app/getProdDesigns.php on line 2
    • > PHP Warning
      require_once(../../wp-load.php): failed to open stream: No such file or directory in wp-content/plugins/pitchprint/app/saveproject.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required '../../wp-load.php' (include_path='.:/usr/share/php') in wp-content/plugins/pitchprint/app/saveproject.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/pitchprint/pitchprint.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === pitchprint === )
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt is a good inspiration

pitchprint/pitchprint.php Passed 13 tests

The main PHP script in "PitchPrint" version 10.1.9 is automatically included on every request by WordPress
97 characters long description:
A beautiful web based print customization app for your online store. Integrates with WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,093 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP62091462,093

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity202.00
▷ Minimum class complexity135.00
▷ Maximum class complexity269.00
Average method complexity5.10
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods98
▷ Static methods00.00%
▷ Public methods3535.71%
▷ Protected methods5455.10%
▷ Private methods99.18%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
55 PNG files occupy 0.18MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/files/wav.png4.51KB3.39KB▼ 24.93%
images/files/zip.png2.83KB2.12KB▼ 25.05%
images/zoom.png1.68KB0.43KB▼ 74.38%
images/files/gif.png2.83KB2.09KB▼ 26.01%
images/files/mp3.png3.90KB2.79KB▼ 28.46%