74% withinweb-php-keycodes

Code Review | Sell License Key Codes with WordPress PHP-KeyCodes

WordPress plugin Sell License Key Codes with WordPress PHP-KeyCodes scored74%from 54 tests.

About plugin

  • Plugin page: withinweb-php-key...
  • Plugin version: 2.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.8
  • WordPress version: 6.3.1
  • First release: Jul 12, 2014
  • Latest release: Sep 8, 2021
  • Number of updates: 29
  • Update frequency: every 90.2 days
  • Top authors: paulvgibbs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,956 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.89MB] [CPU: ▲1.60ms] Passed 4 tests

An overview of server-side resources used by Sell License Key Codes with WordPress PHP-KeyCodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5046.06 ▲6.01
Dashboard /wp-admin4.33 ▲1.0358.27 ▲5.19
Posts /wp-admin/edit.php4.38 ▲1.0356.77 ▲8.79
Add New Post /wp-admin/post-new.php6.94 ▲1.0591.80 ▼13.60
Media Library /wp-admin/upload.php4.25 ▲1.0248.62 ▲12.94
Settings /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_settings4.1640.97
KeyCodes /wp-admin/admin.php?page=withinweb-php-keycodes/admin/classes/admindisplay.php4.1641.73
Sales Details /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_salesdetails4.1337.45
Delete Item /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_deleteitem4.1339.44
Product button code /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_buttoncode4.1340.39
Sales /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_sales4.1638.86
Edit Item /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_edititem4.1336.82
Local Test /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_localtest4.1338.18
Item List /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_listitems4.1639.23
IPN Details /wp-admin/edit.php?post_type=paypal_ipn4.3042.84

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 43 new files
Database: 2 new tables, 8 new options
New tables
wp_withinweb_wwkc_keycodes_items
wp_withinweb_wwkc_keycodes_saleshistory
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
withinweb_wwkc_keycodes_paypal_environment
theysaidso_admin_options
withinweb_wwkc_keycodes_ipn_url

Browser metrics Passed 4 tests

A check of browser resources used by Sell License Key Codes with WordPress PHP-KeyCodes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲15713.49 ▼1.058.46 ▲6.7842.88 ▼1.36
Dashboard /wp-admin2,243 ▲655.65 ▼0.0795.91 ▼10.0143.94 ▲1.25
Posts /wp-admin/edit.php2,148 ▲452.02 ▼0.0134.42 ▼1.5136.32 ▲0.47
Add New Post /wp-admin/post-new.php1,564 ▲3823.27 ▼0.38680.07 ▼2.4555.12 ▼1.48
Media Library /wp-admin/upload.php1,448 ▲514.13 ▼0.0499.83 ▼9.9842.51 ▼5.38
Settings /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_settings1,0042.0227.7430.94
KeyCodes /wp-admin/admin.php?page=withinweb-php-keycodes/admin/classes/admindisplay.php1,0491.9923.0734.55
Sales Details /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_salesdetails7181.126.5424.77
Delete Item /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_deleteitem7151.126.8720.04
Product button code /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_buttoncode7221.518.0929.05
Sales /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_sales8361.9922.3527.91
Edit Item /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_edititem7181.516.2721.10
Local Test /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_localtest7081.516.8719.95
Item List /wp-admin/admin.php?page=withinweb_wwkc_keycodes_admin_display_listitems8361.9926.7527.99
IPN Details /wp-admin/edit.php?post_type=paypal_ipn1,2871.9633.8731.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_withinweb_wwkc_keycodes_items
    • wp_withinweb_wwkc_keycodes_saleshistory
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_theysaidso_widget
    • withinweb_wwkc_keycodes_paypal_environment
    • theysaidso_admin_options
    • withinweb_wwkc_keycodes_ipn_url
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 17× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/withinweb-php-keycodes/admin/classes/createitem.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/withinweb-php-keycodes/admin/classes/listitems.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/withinweb-php-keycodes/includes/ipnforwarder.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/withinweb-php-keycodes/admin/classes/deleteitem.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/withinweb-php-keycodes/admin/classes/about.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/withinweb-php-keycodes/keycodes/keycodesactions.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/withinweb-php-keycodes/admin/classes/buttoncode.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/withinweb-php-keycodes/public/classes/publicdisplay.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/withinweb-php-keycodes/admin/classes/posttypes.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/withinweb-php-keycodes/admin/classes/premium.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: key codes, pin codes, mobile phone pins, sell pin codes, license keys...

withinweb-php-keycodes/withinweb-wwkc-keycodes.php 85% from 13 tests

Analyzing the main PHP file in "Sell License Key Codes with WordPress PHP-KeyCodes" version 2.1.6
Please take the time to fix the following:
  • 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
  • Main file name: The principal plugin file should be the same as the plugin slug ("withinweb-php-keycodes.php" instead of "withinweb-wwkc-keycodes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin4,975 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP311,1839404,852
CSS13071
JavaScript35052

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity32.22
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity5.84
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods174
▷ Static methods12169.54%
▷ Public methods15890.80%
▷ Protected methods00.00%
▷ Private methods169.20%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/withinweb_wwkc_keycodes_icon.png1.48KB0.83KB▼ 43.92%