84% wooproduct-shortcode

Code Review | WooProduct Shortcode

WordPress plugin WooProduct Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: wooproduct-shortcode
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.9
  • WordPress version: 6.3.1
  • First release: Oct 24, 2013
  • Latest release: May 7, 2014
  • Number of updates: 6
  • Update frequency: every 32.5 days
  • Top authors: WP-Biz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,659 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.16MB] [CPU: ▼19.32ms] Passed 4 tests

Server-side resources used by WooProduct Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.01 ▼8.19
Dashboard /wp-admin3.21 ▼0.1033.48 ▼22.00
Posts /wp-admin/edit.php3.27 ▼0.0838.03 ▼10.93
Add New Post /wp-admin/post-new.php5.45 ▼0.4475.75 ▼36.15
Media Library /wp-admin/upload.php3.21 ▼0.0233.76 ▼4.77

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WooProduct Shortcode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.27 ▼0.291.97 ▲0.3145.93 ▲5.22
Dashboard /wp-admin2,195 ▲215.60 ▲0.0782.51 ▼8.3038.25 ▼2.99
Posts /wp-admin/edit.php2,103 ▲32.02 ▼0.0240.51 ▲5.7535.44 ▼5.09
Add New Post /wp-admin/post-new.php1,526 ▼022.98 ▼0.03691.16 ▲12.9150.55 ▼8.88
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.06110.26 ▼6.5347.24 ▼0.65

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wooproduct-shortcode/wooproduct-shortcode.php:34
    • > PHP Notice
      Undefined variable: class in wp-content/plugins/wooproduct-shortcode/wooproduct-template.php on line 1
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/wooproduct-shortcode/wooproduct-template.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function post_class() in wp-content/plugins/wooproduct-shortcode/wooproduct-template.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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 your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wooproduct-shortcode === )
The official readme.txt is a good inspiration

wooproduct-shortcode/wooproduct-shortcode.php 92% from 13 tests

The entry point to "WooProduct Shortcode" version 0.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "3.0.0")

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
Good job! No executable or dangerous file extensions detected110 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2484085
CSS10025

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin