84% selectionsio-api-connect

Code Review | selectionsio API-Connect

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

About plugin

  • Plugin page: selectionsio-api-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 30, 2023
  • Latest release: Jan 30, 2023
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: selectionsio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /111 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.93ms] Passed 4 tests

This is a short check of server-side resources used by selectionsio API-Connect
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.22 ▼4.01
Dashboard /wp-admin3.35 ▲0.0544.89 ▼8.56
Posts /wp-admin/edit.php3.40 ▲0.0448.73 ▲0.29
Add New Post /wp-admin/post-new.php5.93 ▲0.0492.34 ▼7.44
Media Library /wp-admin/upload.php3.27 ▲0.0434.42 ▲0.52

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for selectionsio API-Connect
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.25 ▼1.111.73 ▼0.3640.64 ▼3.44
Dashboard /wp-admin2,222 ▲344.85 ▼1.05101.16 ▼14.1742.66 ▼3.33
Posts /wp-admin/edit.php2,105 ▲162.01 ▲0.0140.68 ▲5.8437.38 ▼3.53
Add New Post /wp-admin/post-new.php1,546 ▲1323.27 ▲0.03620.66 ▼60.8766.75 ▲17.48
Media Library /wp-admin/upload.php1,404 ▲164.15 ▼0.0496.65 ▼8.5642.40 ▼2.17

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

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 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 items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/selectionsio-api-connect/shortcodes.php:75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/selectionsio-api-connect/shortcodes.php:75

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 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: shop, api, kalkulation, selectionsio, web2print...

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

The main PHP file in "selectionsio API-Connect" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 241 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("selectionsio-api-connect.php" instead of "api-settings.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected601 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22815336
JavaScript1263265

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/selectionsio.png15.15KB6.42KB▼ 57.63%