84% product-category-page-relation

Code Review | Product category and page relation

WordPress plugin Product category and page relation scored84%from 54 tests.

About plugin

  • Plugin page: product-category-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Apr 12, 2016
  • Latest release: Apr 29, 2016
  • Number of updates: 5
  • Update frequency: every 3.4 days
  • Top authors: shiv_nbt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /6,437 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by Product category and page relation
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.01 ▼4.51
Dashboard /wp-admin3.33 ▼0.0254.03 ▼11.22
Posts /wp-admin/edit.php3.38 ▲0.0250.16 ▲1.30
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.18 ▼4.19
Media Library /wp-admin/upload.php3.25 ▲0.0239.45 ▲4.74

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Product category and page relation
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲5414.24 ▼0.031.64 ▼0.3843.42 ▼7.41
Dashboard /wp-admin2,198 ▲215.63 ▼0.0491.94 ▼14.2440.60 ▼2.30
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0236.60 ▲0.8637.98 ▲5.32
Add New Post /wp-admin/post-new.php1,526 ▼223.55 ▲0.54690.05 ▲41.0048.47 ▼10.12
Media Library /wp-admin/upload.php1,403 ▲34.19 ▲0.01100.62 ▼10.5144.30 ▼1.02

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/product-category-page-relation/Product-category-page-relation.php:43

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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: woocomerce, category page, category template

product-category-page-relation/Product-category-page-relation.php 92% from 13 tests

"Product category and page relation" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("product-category-page-relation.php" instead of "Product-category-page-relation.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin140 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP337953140

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 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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin