84% wp-ecommerce-retargeting

Code Review | WP eCommerce Retargeting

WordPress plugin WP eCommerce Retargeting scored84%from 54 tests.

About plugin

  • Plugin page: wp-ecommerce-reta...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4.1
  • WordPress version: 6.3.1
  • First release: Jul 15, 2015
  • Latest release: Jan 12, 2016
  • Number of updates: 3
  • Update frequency: every 60.4 days
  • Top authors: retargeting (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /737 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by WP eCommerce Retargeting
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.17 ▼8.21
Dashboard /wp-admin3.31 ▲0.0048.51 ▼17.44
Posts /wp-admin/edit.php3.36 ▲0.0049.84 ▼2.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.32 ▼6.48
Media Library /wp-admin/upload.php3.23 ▲0.0035.62 ▼3.56

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP eCommerce Retargeting
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.381.83 ▲0.1041.10 ▼3.37
Dashboard /wp-admin2,192 ▲185.54 ▲0.0390.27 ▲4.2840.69 ▼0.50
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0336.18 ▼6.1334.14 ▼2.02
Add New Post /wp-admin/post-new.php1,528 ▲222.94 ▲0.20610.62 ▼62.1262.96 ▲7.27
Media Library /wp-admin/upload.php1,400 ▼04.13 ▼0.02111.52 ▲7.2048.85 ▲0.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WPSC_Settings_Tab' not found in wp-content/plugins/wp-ecommerce-retargeting/classes/class-wpsc-settings-tab-retargeting.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% 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
3 plugin tags: wp ecommerce, retargeting, wpcommerce

wp-ecommerce-retargeting/wpec-retargeting.php 92% from 13 tests

"WP eCommerce Retargeting" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-ecommerce-retargeting.php" instead of "wpec-retargeting.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 detected938 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP517297938

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity26.50
▷ Minimum class complexity3.00
▷ Maximum class complexity82.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods48
▷ Static methods12.08%
▷ Public methods3879.17%
▷ Protected methods714.58%
▷ Private methods36.25%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin