79% shop-page-wp

Code Review | Shop Page WP

WordPress plugin Shop Page WP scored79%from 54 tests.

About plugin

  • Plugin page: shop-page-wp
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 22, 2017
  • Latest release: Dec 2, 2023
  • Number of updates: 49
  • Update frequency: every 49.9 days
  • Top authors: leonmagee (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

5,000+ active /105,058 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▼0.95ms] Passed 4 tests

Analyzing server-side resources used by Shop Page WP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2339.78 ▼3.40
Dashboard /wp-admin3.52 ▲0.2249.61 ▲1.68
Posts /wp-admin/edit.php3.64 ▲0.2849.59 ▲0.77
Add New Post /wp-admin/post-new.php6.12 ▲0.2485.71 ▼2.86
Media Library /wp-admin/upload.php3.45 ▲0.2243.02 ▲11.96
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=shop-page-wp3.4438.91
Instructions /wp-admin/edit.php?post_type=shop-page-wp&page=shop-page-wp-instructions3.4135.56
All Products /wp-admin/edit.php?post_type=shop-page-wp3.5040.21
Add New Product /wp-admin/post-new.php?post_type=shop-page-wp3.5351.16
Settings /wp-admin/edit.php?post_type=shop-page-wp&page=shop-page-wp-settings3.3943.31

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 10 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Shop Page WP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9314.72 ▲0.371.71 ▲0.0036.29 ▼11.70
Dashboard /wp-admin2,241 ▲605.59 ▼0.1090.68 ▼20.9139.57 ▼7.34
Posts /wp-admin/edit.php2,143 ▲432.00 ▲0.0539.79 ▲0.1935.27 ▼3.39
Add New Post /wp-admin/post-new.php6,400 ▲4,87127.60 ▲4.42834.50 ▲147.0237.20 ▼18.53
Media Library /wp-admin/upload.php1,443 ▲434.15 ▼0.0396.77 ▼11.8642.12 ▼2.63
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=shop-page-wp1,4952.2631.5833.64
Instructions /wp-admin/edit.php?post_type=shop-page-wp&page=shop-page-wp-instructions9111.9722.3935.10
All Products /wp-admin/edit.php?post_type=shop-page-wp1,1621.9031.6331.20
Add New Product /wp-admin/post-new.php?post_type=shop-page-wp1,8263.6176.1931.45
Settings /wp-admin/edit.php?post_type=shop-page-wp&page=shop-page-wp-settings1,0202.0523.9334.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 10 options
    • category_children
    • shop-page-wp-link-target
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_shop_page_wp
    • shop-page-wp-legacy-format
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=shop-page-wp&page=shop-page-wp-settings
    • > Notice in wp-content/plugins/shop-page-wp/includes/class-shop-page-wp-admin-settings.php+270
    Trying to access array offset on value of type bool

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
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/shop-page-wp/includes/class-shop-page-wp-shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/shop-page-wp/includes/class-shop-page-wp-widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found


Plugin configuration Passed 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
6 plugin tags: amazon, amazon affiliates, affiliate, amazon associates, shop...

shop-page-wp/shop-page-wp.php Passed 13 tests

This is the main PHP file of "Shop Page WP" version 1.3.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
37 characters long description:
Create a shop for affiliate products.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,835 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity8.08
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
▷ Static methods4282.35%
▷ Public methods51100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/product-image-placeholder.png4.71KB1.73KB▼ 63.21%