10% product-requirements

Code Review | Product Requirements

WordPress plugin Product Requirements scored10%from 54 tests.

About plugin

  • Plugin page: product-requirements
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3
  • WordPress version: 6.3.1
  • First release: Apr 21, 2014
  • Latest release: Aug 10, 2015
  • Number of updates: 9
  • Update frequency: every 52.9 days
  • Top authors: leewillis77 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,179 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/product-requirements/pblw-requirements-widget.class.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; PblwRequirements_Widget has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼55.24ms] Passed 4 tests

Server-side resources used by Product Requirements
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.404.74 ▼35.09
Dashboard /wp-admin2.09 ▼1.226.36 ▼47.01
Posts /wp-admin/edit.php2.09 ▼1.276.06 ▼45.48
Add New Post /wp-admin/post-new.php2.09 ▼3.806.16 ▼93.36
Media Library /wp-admin/upload.php2.09 ▼1.145.50 ▼31.15

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_pblw-requirements
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Requirements
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.361.90 ▲0.1243.28 ▲0.44
Dashboard /wp-admin2,198 ▲275.63 ▼0.0290.03 ▼0.3740.03 ▼3.84
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0535.17 ▼8.2333.63 ▼4.12
Add New Post /wp-admin/post-new.php1,526 ▼022.77 ▼0.51645.79 ▼24.1755.58 ▼1.71
Media Library /wp-admin/upload.php1,400 ▲34.25 ▲0.01103.96 ▼12.7945.24 ▼3.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/product-requirements/pblw-requirements-widget.class.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; PblwRequirements_Widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_pblw-requirements
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/product-requirements/templates/pblw-requirements-widget-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/product-requirements/pblw-requirements-widget.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/product-requirements/pblw-requirements-widget.class.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 Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: easy digital downloads, edd, woocommerce, requirements, plugins...

product-requirements/pblw-requirements.php 77% from 13 tests

The primary PHP file in "Product Requirements" version 1.3 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Main file name: The principal plugin file should be the same as the plugin slug ("product-requirements.php" instead of "pblw-requirements.php")

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 plugin209 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP742101200
CSS1009

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity1.60
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
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