72% catalog-organization

Code Review | CATalog-Organization WP-Plugin

WordPress plugin CATalog-Organization WP-Plugin scored72%from 54 tests.

About plugin

  • Plugin page: catalog-organization
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.7
  • WordPress version: 6.3.1
  • First release: Feb 17, 2021
  • Latest release: Feb 18, 2021
  • Number of updates: 20
  • Update frequency: N/A
  • Top authors: alberphilipp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,070 total downloads


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 gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.92ms] Passed 4 tests

A check of server-side resources used by CATalog-Organization WP-Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1340.98 ▼4.95
Dashboard /wp-admin3.44 ▲0.1456.17 ▲7.20
Posts /wp-admin/edit.php3.56 ▲0.2053.12 ▲1.63
Add New Post /wp-admin/post-new.php5.66 ▼0.2378.75 ▼23.43
Media Library /wp-admin/upload.php3.36 ▲0.1439.38 ▲3.09
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=catalog3.3635.77
Add New /wp-admin/post-new.php?post_type=catalog3.2233.65
All Items /wp-admin/edit.php?post_type=catalog3.4137.54
CATalog Settings /wp-admin/edit.php?post_type=catalog&page=catalog3.3133.18

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for CATalog-Organization WP-Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲10614.44 ▲0.072.36 ▲0.6846.24 ▲3.24
Dashboard /wp-admin2,262 ▲885.92 ▲0.4091.05 ▲0.1837.29 ▼4.71
Posts /wp-admin/edit.php2,166 ▲632.37 ▲0.3836.13 ▼5.6932.32 ▼11.84
Add New Post /wp-admin/post-new.php1,582 ▲4523.61 ▲5.61623.02 ▲0.9933.32 ▼32.61
Media Library /wp-admin/upload.php1,464 ▲614.61 ▲0.42104.45 ▲1.7946.89 ▼2.61
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=catalog1,3912.1232.7631.16
Add New /wp-admin/post-new.php?post_type=catalog2,4687.85193.7072.51
All Items /wp-admin/edit.php?post_type=catalog1,1842.2935.0030.95
CATalog Settings /wp-admin/edit.php?post_type=catalog&page=catalog1,0162.5840.2227.51

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
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=catalog
    • > Notice in wp-content/plugins/catalog-organization/catalog.php+138
    Only variables should be assigned by reference
  • 24 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=catalog&page=catalog
    • > Notice in wp-content/plugins/catalog-organization/admin/settings.php+143
    Trying to access array offset on value of type bool

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/catalog-organization/catalog.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/catalog-organization/catalog-item-meta-box.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/catalog-organization/admin/settings.php:70
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/catalog-organization/admin/shortcode.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/catalog-organization/templates/single-catalog.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI found ("paypal.me/kohleanphilipp")
Please take inspiration from this readme.txt

catalog-organization/catalog.php 85% from 13 tests

The entry point to "CATalog-Organization WP-Plugin" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("catalog-organization.php" instead of "catalog.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected20,015 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions25100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/Logo.png12.07KB5.01KB▼ 58.52%