93% wp-e-commerce-putler-connector

Code Review | WP-e-Commerce Putler Connector

WordPress plugin WP-e-Commerce Putler Connector scored 93% from 54 tests.

About plugin

  • Plugin page: wp-e-commerce-put...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.9.1
  • WordPress version: 5.8.1
  • First release: Oct 23, 2013
  • Latest release: Jul 23, 2014
  • Number of updates: 7
  • Update frequency: every 39.0 days
  • Top authors: putler (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 736 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼139.80ms] Passed 4 tests

An overview of server-side resources used by WP-e-Commerce Putler Connector
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1238.30 ▲12.17
Dashboard /wp-admin3.07 ▲0.0157.83 ▲6.18
Posts /wp-admin/edit.php3.12 ▲0.0149.42 ▲0.99
Add New Post /wp-admin/post-new.php5.42 ▼0.0191.19 ▼571.43
Media Library /wp-admin/upload.php3.01 ▲0.0139.60 ▲5.06

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP-e-Commerce Putler Connector
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.37 ▲0.878.89 ▼5.1452.97 ▲2.16
Dashboard /wp-admin2,967 ▲366.00 ▼0.21160.43 ▲11.89107.49 ▼1.07
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0179.10 ▲4.5197.59 ▲6.68
Add New Post /wp-admin/post-new.php1,498 ▼8318.99 ▼1.24409.19 ▼24.15113.65 ▲1.35
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.02168.29 ▲2.31115.63 ▼4.17

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 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 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 following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-e-commerce-putler-connector/wpec-putler-connector.php:12

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 90% 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
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (WP-e-Commerce Putler Connector Settings Page), #2 (Putler Sales Dashboard), #3 (Adding a new account in Putler - Notice API token that needs to be copied to Putler Connector settings)
  • Tags: There are too many tags (14 tag instead of maximum 10)
Please take inspiration from this readme.txt

wp-e-commerce-putler-connector/wpec-putler-connector.php 92% from 13 tests

The principal PHP file in "WP-e-Commerce Putler Connector" v. 2.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-e-commerce-putler-connector.php" instead of "wpec-putler-connector.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
Success! There were no dangerous files found in this plugin559 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP313843427
JavaScript1532117
CSS11015

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity32.00
▷ Minimum class complexity29.00
▷ Maximum class complexity35.00
Average method complexity5.77
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods1184.62%
▷ Protected methods00.00%
▷ Private methods215.38%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
4 compressed PNG files occupy 0.06MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png4.86KB5.36KB0.00%
assets/images/green-tick.png1.79KB1.85KB0.00%
screenshot-2.png51.85KB55.70KB0.00%
screenshot-1.png4.36KB4.71KB0.00%