84% up-wp-cart

Code Review | UP WP Cart

WordPress plugin UP WP Cart scored84%from 54 tests.

About plugin

  • Plugin page: up-wp-cart
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7
  • WordPress version: 6.3.1
  • First release: Jun 12, 2017
  • Latest release: Jun 12, 2017
  • Number of updates: 12
  • Update frequency: every 14.5 days
  • Top authors: viewup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /884 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.61MB] [CPU: ▼17.14ms] Passed 4 tests

Server-side resources used by UP WP Cart
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0644.18 ▲2.82
Dashboard /wp-admin3.37 ▲0.0745.12 ▼3.21
Posts /wp-admin/edit.php3.42 ▲0.0746.19 ▼2.98
Add New Post /wp-admin/post-new.php3.25 ▼2.6436.41 ▼59.96
Media Library /wp-admin/upload.php3.29 ▲0.0736.47 ▼2.42

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for UP WP Cart
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.17 ▼1.211.78 ▼0.1043.92 ▼3.83
Dashboard /wp-admin2,222 ▲345.86 ▼0.0395.63 ▼17.5039.28 ▼4.57
Posts /wp-admin/edit.php2,102 ▲102.04 ▲0.0539.98 ▼9.9735.21 ▼5.54
Add New Post /wp-admin/post-new.php1,533 ▲1423.24 ▼0.17595.79 ▲8.3049.34 ▲6.79
Media Library /wp-admin/upload.php1,401 ▲134.15 ▼0.0294.78 ▼5.2840.72 ▼1.79

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 40× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/up-wp-cart/up-wp-cart/trunk/default-filters.php:139
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/up-wp-cart/wpcf7/email/wpcf7-email.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/up-wp-cart/up-wp-cart/trunk/WPCartAPI.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/up-wp-cart/up-wp-cart/trunk/default-filters.php:139
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/up-wp-cart/default-filters.php:139
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/up-wp-cart/wpcf7/email/wpcf7-email-render-text.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/up-wp-cart/up-wp-cart/trunk/wpcf7/wpcf7-validation.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/up-wp-cart/admin/settings.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/up-wp-cart/up-wp-cart/trunk/shortcode/shortcode.php:377
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/up-wp-cart/up-wp-cart/trunk/wpcf7/email/wpcf7-email.php:38

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 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

up-wp-cart/up-wp-cart.php Passed 13 tests

The main file in "UP WP Cart" v. 0.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
25 characters long description:
Simple Cart for WordPress

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
No dangerous file extensions were detected1,851 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP244527861,468
Markdown7960383

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity5.67
▷ Minimum class complexity2.00
▷ Maximum class complexity11.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods50
▷ Static methods00.00%
▷ Public methods4284.00%
▷ Protected methods00.00%
▷ Private methods816.00%
Functions144
▷ Named functions144100.00%
▷ Anonymous functions00.00%
Constants48
▷ Global constants3675.00%
▷ Class constants1225.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin