83% ecommerce-featured-reviews

Code Review | Featured Reviews for Woocommerce

WordPress plugin Featured Reviews for Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: ecommerce-feature...
  • Plugin version: 1.1
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.2
  • WordPress version: 6.3.1
  • First release: Nov 19, 2019
  • Latest release: Nov 30, 2019
  • Number of updates: 9
  • Update frequency: every 2.6 days
  • Top authors: sony7596 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /544 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.37ms] Passed 4 tests

Analyzing server-side resources used by Featured Reviews for Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.64 ▲3.96
Dashboard /wp-admin3.32 ▲0.0243.59 ▼6.23
Posts /wp-admin/edit.php3.37 ▲0.0145.76 ▼0.98
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.48 ▼6.94
Media Library /wp-admin/upload.php3.24 ▲0.0135.74 ▲0.68

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Featured Reviews for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲10113.27 ▼0.912.13 ▲0.5539.35 ▼0.09
Dashboard /wp-admin2,213 ▲255.81 ▲0.9096.27 ▼9.1641.85 ▼1.12
Posts /wp-admin/edit.php2,094 ▲52.02 ▲0.0340.24 ▼0.2637.67 ▲2.17
Add New Post /wp-admin/post-new.php1,542 ▼2418.16 ▼0.99636.00 ▲20.7366.32 ▲14.26
Media Library /wp-admin/upload.php1,393 ▲24.22 ▲0.0297.00 ▼1.3645.30 ▲2.66

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

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

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)
Good news, no errors were detected

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ecommerce-featured-reviews/featured-reviews-for-woocommerce.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: The official readme.txt might help

ecommerce-featured-reviews/featured-reviews-for-woocommerce.php 85% from 13 tests

The principal PHP file in "Featured Reviews for Woocommerce" v. 1.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ecommerce-featured-reviews.php" instead of "featured-reviews-for-woocommerce.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin243 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13817142
JavaScript261065
CSS17036

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods13
▷ Static methods215.38%
▷ Public methods1076.92%
▷ Protected methods00.00%
▷ Private methods323.08%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.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 were not PNG files found in your plugin