10% wp-e-commerce-recommendations

Code Review | WP e-Commerce Recommendations

WordPress plugin WP e-Commerce Recommendations scored10%from 54 tests.

About plugin

  • Plugin page: wp-e-commerce-rec...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.7.1
  • WordPress version: 6.3.1
  • First release: Oct 14, 2013
  • Latest release: Nov 26, 2013
  • Number of updates: 20
  • Update frequency: every 2.3 days
  • Top authors: nToklo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,580 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/wp-e-commerce-recommendations/wpec-recommendations.php+690
    include_once(/wp-content/plugins/wp-e-commerce/wpsc-admin/settings-page.php): failed to open stream: No such file or directory

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

A check of server-side resources used by WP e-Commerce Recommendations
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0044.49 ▲2.10
Dashboard /wp-admin3.31 ▲0.0053.60 ▼3.79
Posts /wp-admin/edit.php3.36 ▲0.0049.42 ▼8.04
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.30 ▼10.06
Media Library /wp-admin/upload.php3.23 ▲0.0039.84 ▲4.22

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP e-Commerce Recommendations
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▲0.001.82 ▲0.1444.36 ▼3.81
Dashboard /wp-admin2,198 ▲185.60 ▼0.0983.89 ▼9.1639.06 ▼3.72
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0436.25 ▲1.1131.94 ▼7.92
Add New Post /wp-admin/post-new.php1,547 ▲2123.15 ▲5.48661.53 ▼33.3055.03 ▼10.83
Media Library /wp-admin/upload.php1,403 ▼04.23 ▲0.01103.66 ▲3.4746.04 ▼0.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-e-commerce-recommendations/wpec-recommendations.php:56

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: wordpress, e-commerce, recommendations, retail

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

"WP e-Commerce Recommendations" version 1.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-e-commerce-recommendations.php" instead of "wpec-recommendations.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,956 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP12161151,306
CSS24261598
SVG40452

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity24.67
▷ Minimum class complexity9.00
▷ Maximum class complexity39.00
Average method complexity8.89
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions33100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/console.png53.06KB16.68KB▼ 68.57%
img/ntoklo_logo_2x.png7.58KB4.04KB▼ 46.73%
img/ntoklo_logo.png4.89KB2.92KB▼ 40.26%