61% affiliate-products-list-by-conicplex

Code Review | Affiliate Products List by ConicPlex

WordPress plugin Affiliate Products List by ConicPlex scored61%from 54 tests.

About plugin

  • Plugin page: affiliate-product...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9.3-5.9.3
  • WordPress version: 6.3.1
  • First release: May 7, 2022
  • Latest release: May 14, 2022
  • Number of updates: 5
  • Update frequency: every 1.6 days
  • Top authors: sajilmemon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /417 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.04MB] [CPU: ▲0.09ms] Passed 4 tests

Analyzing server-side resources used by Affiliate Products List by ConicPlex
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.49 ▲2.10
Dashboard /wp-admin3.35 ▲0.0562.95 ▲9.68
Posts /wp-admin/edit.php3.40 ▲0.0554.86 ▲4.12
Add New Post /wp-admin/post-new.php5.93 ▲0.0595.79 ▼4.24
Media Library /wp-admin/upload.php3.28 ▲0.0536.35 ▼1.62
Products List Delete /wp-admin/admin.php?page=aplbcp-products-delete3.2434.15
Products List Edit Submit /wp-admin/admin.php?page=aplbcp-products-edit-submit3.2433.48
Settings /wp-admin/admin.php?page=aplbcp_settings3.2631.83
Add New /wp-admin/admin.php?page=aplbcp_addnew3.3941.86
Products Preview /wp-admin/admin.php?page=aplbcp-products-preview3.2834.53
Products List Settings /wp-admin/admin.php?page=aplbcp-products-settings3.2534.02
Products List Edit /wp-admin/admin.php?page=aplbcp-products-edit3.2632.35
Add New /wp-admin/admin.php?page=aplbcp-addnew-submit3.2434.20
All Product List /wp-admin/admin.php?page=aplbcp_list_all3.2633.99

Server storage [IO: ▲0.68MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • Illegal file modification found: 2 files (0.00KB) outside of "wp-content/plugins/affiliate-products-list-by-conicplex/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/affiliate-products-list-by-conicplex/assets/icon-256\303\227256.png"
    • (new file) "wp-content/plugins/affiliate-products-list-by-conicplex/assets/icon-128\303\227128.png"
Filesystem: 27 new files
Database: 3 new tables, 6 new options
New tables
wp_aplbcp_products
wp_aplbcp_products_list
wp_aplbcp_setting
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Affiliate Products List by ConicPlex: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲13113.50 ▼0.674.70 ▲2.8543.21 ▼0.92
Dashboard /wp-admin2,258 ▲704.95 ▼0.14108.62 ▼7.4240.73 ▼5.86
Posts /wp-admin/edit.php2,141 ▲522.00 ▲0.0241.09 ▲2.5534.35 ▼0.70
Add New Post /wp-admin/post-new.php1,577 ▲3923.31 ▼0.06656.52 ▼28.1455.05 ▼8.66
Media Library /wp-admin/upload.php1,440 ▲554.23 ▲0.0199.47 ▼8.7145.05 ▼5.66
Products List Delete /wp-admin/admin.php?page=aplbcp-products-delete1,4912.3126.4931.25
Products List Edit Submit /wp-admin/admin.php?page=aplbcp-products-edit-submit1,5262.3426.8832.51
Settings /wp-admin/admin.php?page=aplbcp_settings1,0912.0422.6034.75
Add New /wp-admin/admin.php?page=aplbcp_addnew4,08113.98401.60128.23
Products Preview /wp-admin/admin.php?page=aplbcp-products-preview8162.0527.1926.41
Products List Settings /wp-admin/admin.php?page=aplbcp-products-settings8102.0222.5522.77
Products List Edit /wp-admin/admin.php?page=aplbcp-products-edit1,5102.3127.2831.12
Add New /wp-admin/admin.php?page=aplbcp-addnew-submit1,5312.3927.5032.58
All Product List /wp-admin/admin.php?page=aplbcp_list_all8452.0324.9129.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_aplbcp_setting
    • wp_aplbcp_products
    • wp_aplbcp_products_list
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aplbcp-products-preview
    • > Notice in wp-content/plugins/affiliate-products-list-by-conicplex/aplbcp-products.php+25
    Undefined variable: product_id
    • > GET request to /wp-admin/admin.php?page=aplbcp-products-preview
    • > Notice in wp-content/plugins/affiliate-products-list-by-conicplex/aplbcp-products.php+165
    Undefined offset: 0
    • > GET request to /wp-admin/admin.php?page=aplbcp-products-preview
    • > Notice in wp-content/plugins/affiliate-products-list-by-conicplex/aplbcp-products.php+165
    Trying to get property 'product_list_name' of non-object

SRP 0% 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 fix the following items
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/affiliate-products-list-by-conicplex/affiliate-products-list-by-conicplex.php
    • > /wp-content/plugins/affiliate-products-list-by-conicplex/include/aplbcp-products-delete.php
    • > /wp-content/plugins/affiliate-products-list-by-conicplex/include/aplbcp-products-edit-submit.php
    • > /wp-content/plugins/affiliate-products-list-by-conicplex/include/aplbcp-add-new-submit.php
    • > /wp-content/plugins/affiliate-products-list-by-conicplex/index.php
  • 10× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/affiliate-products-list-by-conicplex/aplbcp-products-edit.php:4
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/affiliate-products-list-by-conicplex/aplbcp-settings.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/affiliate-products-list-by-conicplex/aplbcp-products.php:5
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/affiliate-products-list-by-conicplex/aplbcp_settings.php:5
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/affiliate-products-list-by-conicplex/aplbcp-products-list.php on line 3
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/affiliate-products-list-by-conicplex/aplbcp-products.php on line 3
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/affiliate-products-list-by-conicplex/aplbcp_settings.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/affiliate-products-list-by-conicplex/aplbcp-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_media() in wp-content/plugins/affiliate-products-list-by-conicplex/aplbcp-products-add-new.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/affiliate-products-list-by-conicplex/aplbcp-products-list.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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: Screenshot #1 (Add New Affiliate Products List.) image missing
The official readme.txt is a good inspiration

affiliate-products-list-by-conicplex/affiliate-products-list-by-conicplex.php 85% from 13 tests

The entry point to "Affiliate Products List by ConicPlex" version 1.0.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Description: Keep the plugin description shorter than 140 characters (currently 211 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,701 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12218441,211
CSS2622466
JavaScript11023
HTML1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.62MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png22.41KB10.87KB▼ 51.50%
assets/screenshot-3.png83.59KB37.58KB▼ 55.04%
assets/icon-256×256.png10.84KB4.33KB▼ 60.06%
assets/screenshot-5.png107.72KB34.16KB▼ 68.29%
assets/banner-1544x500.png40.37KB17.96KB▼ 55.51%