62% wp-catalogue

Code Review | WP Catalogue

WordPress plugin WP Catalogue scored62%from 54 tests.

About plugin

  • Plugin page: wp-catalogue
  • Plugin version: 1.7.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.7.4
  • WordPress version: 6.3.1
  • First release: Jan 18, 2013
  • Latest release: May 9, 2017
  • Number of updates: 81
  • Update frequency: every 19.4 days
  • Top authors: EnigmaWeb (100%)

Code review

54 tests

User reviews

80 reviews

Install metrics

1,000+ active /115,746 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.45MB] [CPU: ▼11.51ms] Passed 4 tests

Server-side resources used by WP Catalogue
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2542.58 ▲3.23
Dashboard /wp-admin3.53 ▲0.2350.19 ▲2.63
Posts /wp-admin/edit.php3.65 ▲0.2945.31 ▼3.89
Add New Post /wp-admin/post-new.php3.38 ▼2.5136.83 ▼47.10
Media Library /wp-admin/upload.php3.46 ▲0.2336.73 ▲2.32
Order /wp-admin/edit.php?post_type=wpcproduct&page=customtaxorder3.4236.76
WP Catalogue /wp-admin/edit.php?post_type=wpcproduct3.5039.07
Categories /wp-admin/edit-tags.php?taxonomy=wpccategories&post_type=wpcproduct3.4535.49
Settings /wp-admin/edit.php?post_type=wpcproduct&page=catalogue_settings3.4835.70

Server storage [IO: ▲1.03MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 73 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
thumb_width
widget_recent-posts
thumb_height
can_compress_scripts
db_upgraded
theysaidso_admin_options
image_width
image_height

Browser metrics Passed 4 tests

WP Catalogue: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,971 ▲22513.65 ▼0.586.21 ▲4.3441.91 ▼1.57
Dashboard /wp-admin2,251 ▲635.09 ▼0.94107.35 ▼11.4972.14 ▲24.75
Posts /wp-admin/edit.php2,147 ▲582.36 ▲0.3234.52 ▼6.3335.66 ▲0.06
Add New Post /wp-admin/post-new.php1,560 ▲3221.32 ▲3.00707.38 ▲72.5638.50 ▼12.12
Media Library /wp-admin/upload.php1,442 ▲544.46 ▲0.29102.45 ▼6.1772.09 ▲26.69
Order /wp-admin/edit.php?post_type=wpcproduct&page=customtaxorder9432.1226.2033.69
WP Catalogue /wp-admin/edit.php?post_type=wpcproduct1,1282.3134.2029.31
Categories /wp-admin/edit-tags.php?taxonomy=wpccategories&post_type=wpcproduct1,3292.1729.4430.81
Settings /wp-admin/edit.php?post_type=wpcproduct&page=catalogue_settings1,3432.7939.7733.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-catalogue/uninstall.php+23
    Undefined offset: 0
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpcproduct&page=customtaxorder
    • > Warning in wp-content/plugins/wp-catalogue/products/order.php+344
    Use of undefined constant ORDERLY_DOMAIN - assumed 'ORDERLY_DOMAIN' (this will throw an Error in a future version of PHP)

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
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_type_object() in wp-content/plugins/wp-catalogue/products/sort-categories.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-catalogue/wpc-catalogue.php:492
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-catalogue/themefiles/archive-wpcproduct.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-catalogue/index.php:13
    • > PHP Notice
      Undefined index: post_type in wp-content/plugins/wp-catalogue/products/sort-categories.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-catalogue/themefiles/single-wpcproduct.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-catalogue/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-catalogue/themefiles/archive.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-catalogue/products/order.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-catalogue/includes/css/dynamic-styles.css.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpcproduct&page=catalogue_settings
    • > Network (severe)
    wp-content/plugins/wp-catalogue/my-script.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: list products, product catalog, products, catalogue, wp catalogue...

wp-catalogue/index.php 85% from 13 tests

The entry point to "WP Catalogue" version 1.7.6 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 149 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-catalogue.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin4,795 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PO File171,0371,1222,714
PHP14407831,621
CSS331378
JavaScript4251282

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
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%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
7 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/css/images/bgs-1.png1.56KB0.72KB▼ 53.80%
includes/css/images/arrow.png2.87KB0.23KB▼ 92.07%
includes/css/images/cat-rollover.png1.67KB0.71KB▼ 57.39%
includes/css/images/featured.png1.57KB1.53KB▼ 2.50%
images/shopping-basket.png3.32KB0.52KB▼ 84.41%