78% pepperi-open-catalog

Code Review | Pepperi Open Catalog

WordPress plugin Pepperi Open Catalog scored78%from 54 tests.

About plugin

  • Plugin page: pepperi-open-catalog
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.2
  • WordPress version: 6.3.1
  • First release: May 11, 2021
  • Latest release: Oct 31, 2023
  • Number of updates: 42
  • Update frequency: every 22.0 days
  • Top authors: pepperi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /725 total downloads

Benchmarks

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.14MB] [CPU: ▼7.62ms] Passed 4 tests

A check of server-side resources used by Pepperi Open Catalog
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1136.67 ▼6.05
Dashboard /wp-admin3.46 ▲0.1547.67 ▼7.45
Posts /wp-admin/edit.php3.57 ▲0.2148.23 ▼1.37
Add New Post /wp-admin/post-new.php6.04 ▲0.1581.31 ▼15.06
Media Library /wp-admin/upload.php3.38 ▲0.1536.00 ▼1.91
Pepperi Open Catalog /wp-admin/options-general.php?page=PepperiOpenCatalogSettings3.3233.70

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Pepperi Open Catalog
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲17722.89 ▲8.23110.06 ▲108.2256.07 ▲9.54
Dashboard /wp-admin2,205 ▲285.62 ▼0.0389.69 ▲1.0941.52 ▲1.74
Posts /wp-admin/edit.php2,110 ▲102.00 ▲0.0233.43 ▼2.0932.52 ▼3.02
Add New Post /wp-admin/post-new.php1,536 ▲1022.98 ▼0.73624.86 ▼81.5954.67 ▼5.96
Media Library /wp-admin/upload.php1,404 ▲74.25 ▲0.0696.66 ▼13.0341.49 ▼2.97
Pepperi Open Catalog /wp-admin/options-general.php?page=PepperiOpenCatalogSettings8062.0025.4026.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=PepperiOpenCatalogSettings
    • > Notice in wp-content/plugins/pepperi-open-catalog/inc/settings.php+367
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/options-general.php?page=PepperiOpenCatalogSettings
    • > Notice in wp-content/plugins/pepperi-open-catalog/inc/settings.php+367
    Trying to access array offset on value of type null

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pepperi-open-catalog/ajax/Ajax.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/pepperi-open-catalog/inc/settings.php:504
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/pepperi-open-catalog/inc/settings.php:504

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Pepperi Open Catalog allows to add a top bar with your categories dropdown and search box)
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

pepperi-open-catalog/wp-pepOpenCatalog.php 92% from 13 tests

The principal PHP file in "Pepperi Open Catalog" v. 1.1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pepperi-open-catalog.php" instead of "wp-pepOpenCatalog.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
There were no executable files found in this plugin2,957 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript72091061,178
JSON13001,051
PHP419578561
CSS23812124
SVG20143

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity15.25
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods47
▷ Static methods817.02%
▷ Public methods4697.87%
▷ Protected methods00.00%
▷ Private methods12.13%
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

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png25.85KB9.19KB▼ 64.44%
assets/icon-128x128.png12.00KB4.61KB▼ 61.61%