83% wc-trello-powers

Code Review | Powers Triggers for Woocommerce and Trello

WordPress plugin Powers Triggers for Woocommerce and Trello scored83%from 54 tests.

About plugin

  • Plugin page: wc-trello-powers
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.4.0
  • WordPress version: 6.3.1
  • First release: May 29, 2020
  • Latest release: Aug 17, 2020
  • Number of updates: 8
  • Update frequency: every 10.0 days
  • Top authors: felipe152 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /421 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.41ms] Passed 4 tests

An overview of server-side resources used by Powers Triggers for Woocommerce and Trello
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.47 ▼1.08
Dashboard /wp-admin3.37 ▲0.0745.11 ▼1.19
Posts /wp-admin/edit.php3.49 ▲0.1350.28 ▲0.76
Add New Post /wp-admin/post-new.php5.95 ▲0.0791.22 ▼8.11
Media Library /wp-admin/upload.php3.30 ▲0.0737.28 ▲0.98

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

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

Browser metrics Passed 4 tests

Powers Triggers for Woocommerce and Trello: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.26 ▼1.171.67 ▼0.0439.83 ▼6.04
Dashboard /wp-admin2,219 ▲315.84 ▲0.87100.31 ▼16.4840.88 ▼1.53
Posts /wp-admin/edit.php2,105 ▲162.06 ▲0.0540.28 ▲4.3835.02 ▼0.68
Add New Post /wp-admin/post-new.php1,546 ▲1823.27 ▲5.19640.13 ▼42.1756.96 ▼7.68
Media Library /wp-admin/upload.php1,407 ▲254.13 ▼0.09101.76 ▲5.6442.75 ▼0.68

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      include_once(include/class-wtp-trello.php): failed to open stream: No such file or directory in wp-content/plugins/wc-trello-powers/admin/class-wtp-admin.php on line 2
    • > PHP Warning
      include_once(): Failed opening 'include/class-wtp-trello.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wc-trello-powers/admin/class-wtp-admin.php on line 2
    • > PHP Notice
      Undefined variable: the_path in wp-content/plugins/wc-trello-powers/class-wtp-front.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wc-trello-powers/admin/views/wtp-settings-startview.php:12
    • > PHP Notice
      Undefined variable: the_path in wp-content/plugins/wc-trello-powers/admin/class-wtp-admin.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wc-trello-powers === )
  • Screenshots: Please add images for these screenshots: #4 (Home do Trello .), #5 (Cartão Trello de exemplo com informações do pedido do Woocommerce)
You can take inspiration from this readme.txt

wc-trello-powers/wt-powers.php 92% from 13 tests

"Powers Triggers for Woocommerce and Trello" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wc-trello-powers.php" instead of "wt-powers.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,256 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS1571756
PHP6419415
JavaScript111085

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity21.33
▷ Minimum class complexity15.00
▷ Maximum class complexity33.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
There are no PNG files in this plugin