78% twb-woocommerce-reviews

Code Review | TWB Woocommerce Reviews

WordPress plugin TWB Woocommerce Reviews scored78%from 54 tests.

About plugin

  • Plugin page: twb-woocommerce-r...
  • Plugin version: 1.7.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.0.2
  • WordPress version: 6.3.1
  • First release: Nov 14, 2015
  • Latest release: Sep 21, 2022
  • Number of updates: 39
  • Update frequency: every 64.2 days
  • Top authors: absikandar (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

900+ active /10,973 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.12ms] Passed 4 tests

A check of server-side resources used by TWB Woocommerce Reviews
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.18 ▲1.13
Dashboard /wp-admin3.32 ▲0.0245.98 ▼2.66
Posts /wp-admin/edit.php3.37 ▲0.0246.63 ▼3.92
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.66 ▼7.01
Media Library /wp-admin/upload.php3.24 ▲0.0235.05 ▲3.25
TWB Woocommerce Reviews /wp-admin/options-general.php?page=twb-woocommerce-reviews/admin/options.php3.2131.61

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for TWB Woocommerce Reviews
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲7413.26 ▼1.323.58 ▲1.8239.17 ▼1.82
Dashboard /wp-admin2,217 ▲294.86 ▼0.02104.97 ▼2.9240.07 ▼1.07
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0338.36 ▼3.3032.57 ▼6.98
Add New Post /wp-admin/post-new.php1,527 ▲1323.09 ▲5.42632.01 ▼66.5651.08 ▼7.16
Media Library /wp-admin/upload.php1,396 ▲84.20 ▼0.0593.16 ▼14.3241.27 ▼2.34
TWB Woocommerce Reviews /wp-admin/options-general.php?page=twb-woocommerce-reviews/admin/options.php1,3162.5347.6929.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/twb-woocommerce-reviews/twb_wc_reviews_functions.php
    • > /wp-content/plugins/twb-woocommerce-reviews/twb-wc-reviews.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/twb-woocommerce-reviews/admin/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/twb-woocommerce-reviews/twb-output.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (16 tag instead of maximum 10)
The official readme.txt is a good inspiration

twb-woocommerce-reviews/twb-wc-reviews.php 85% from 13 tests

The main PHP script in "TWB Woocommerce Reviews" version 1.7.5 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 306 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("twb-woocommerce-reviews.php" instead of "twb-wc-reviews.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
There were no executable files found in this plugin866 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP616278590
CSS2107271
JavaScript22195

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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 were not PNG files found in your plugin