10% tac-featured-products-widget

Code Review | TAC Featured Products Widget

WordPress plugin TAC Featured Products Widget scored10%from 54 tests.

About plugin

  • Plugin page: tac-featured-prod...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: WP 3.5+
  • WordPress version: 6.3.1
  • First release: Feb 5, 2013
  • Latest release: Feb 5, 2013
  • Number of updates: 8
  • Update frequency: every 0.3 days
  • Top authors: TimCarey (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,527 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/tac-featured-products-widget/TAC_Featured_Products_Widget.php+43
    Methods with the same name as their class will not be constructors in a future version of PHP; TAC_Featured_Products_Widget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼53.28ms] Passed 4 tests

This is a short check of server-side resources used by TAC Featured Products Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.383.92 ▼36.00
Dashboard /wp-admin2.10 ▼1.214.66 ▼47.16
Posts /wp-admin/edit.php2.10 ▼1.266.18 ▼41.27
Add New Post /wp-admin/post-new.php2.10 ▼3.797.10 ▼88.70
Media Library /wp-admin/upload.php2.10 ▼1.135.06 ▼30.06

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_tac_featured_products_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for TAC Featured Products Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.331.53 ▼0.2441.13 ▼7.58
Dashboard /wp-admin2,206 ▲204.84 ▼0.14111.40 ▼7.7243.97 ▼3.03
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0540.06 ▲2.7734.54 ▲3.05
Add New Post /wp-admin/post-new.php1,542 ▲2817.94 ▲0.46606.21 ▼88.3451.11 ▼15.37
Media Library /wp-admin/upload.php1,385 ▼04.21 ▼0.0193.86 ▼7.7140.84 ▼1.66

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/tac-featured-products-widget/TAC_Featured_Products_Widget.php+43
    Methods with the same name as their class will not be constructors in a future version of PHP; TAC_Featured_Products_Widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_tac_featured_products_widget
    • widget_theysaidso_widget
    • db_upgraded

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tac-featured-products-widget/TAC_Featured_Products_Widget.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Requires at least: Version not formatted correctly
  • Tested up to: Version not formatted correctly
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === tac-featured-products-widget === )
The official readme.txt is a good inspiration

tac-featured-products-widget/TAC_Featured_Products_Widget.php 77% from 13 tests

The main PHP file in "TAC Featured Products Widget" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 324 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("tac-featured-products-widget.php" instead of "TAC_Featured_Products_Widget.php")
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "WP 3.5")

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
There were no executable files found in this plugin101 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15040101

PHP code Passed 2 tests

A short review 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.22
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

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