84% printshopcreator-api-connect

Code Review | PrintshopCreator API-Connect

WordPress plugin PrintshopCreator API-Connect scored84%from 54 tests.

About plugin

  • Plugin page: printshopcreator-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 23, 2023
  • Latest release: Jan 24, 2023
  • Number of updates: 20
  • Update frequency: every 0.2 days
  • Top authors: printshopcreator (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /123 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by PrintshopCreator API-Connect
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.94 ▼1.26
Dashboard /wp-admin3.35 ▲0.0042.21 ▼13.62
Posts /wp-admin/edit.php3.40 ▲0.0446.21 ▼4.15
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.25 ▼5.01
Media Library /wp-admin/upload.php3.27 ▲0.0435.26 ▲1.68

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for PrintshopCreator API-Connect
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9514.83 ▲0.431.88 ▼0.0539.06 ▼8.38
Dashboard /wp-admin2,222 ▲345.85 ▼0.01107.10 ▲2.0741.96 ▲3.49
Posts /wp-admin/edit.php2,105 ▲162.05 ▲0.0639.27 ▲3.9535.62 ▲1.62
Add New Post /wp-admin/post-new.php1,556 ▲2818.16 ▼0.07604.35 ▲17.8759.07 ▲4.87
Media Library /wp-admin/upload.php1,401 ▲104.29 ▲0.03100.18 ▲1.0042.39 ▼2.18

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/printshopcreator-api-connect/shortcodes.php:71
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/printshopcreator-api-connect/shortcodes.php:71

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: kalkulation, web2print, shop, printshopcreator, printshop...

printshopcreator-api-connect/api-settings.php 85% from 13 tests

The principal PHP file in "PrintshopCreator API-Connect" v. 1.0.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 249 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("printshopcreator-api-connect.php" instead of "api-settings.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin600 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22715335
JavaScript1263265

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/printshop-creator.png3.66KB3.66KB0.00%