56% allkeyshop-affiliate

Code Review | Allkeyshop Affiliate

WordPress plugin Allkeyshop Affiliate scored56%from 54 tests.

About plugin

  • Plugin page: allkeyshop-affiliate
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.0
  • WordPress version: 6.3.1
  • First release: Jul 14, 2022
  • Latest release: Nov 21, 2022
  • Number of updates: 24
  • Update frequency: every 5.5 days
  • Top authors: allkeyshop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /691 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.83MB] [CPU: ▼34.29ms] Passed 4 tests

An overview of server-side resources used by Allkeyshop Affiliate
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1339.39 ▼10.08
Dashboard /wp-admin3.12 ▼0.1925.23 ▼21.67
Posts /wp-admin/edit.php3.12 ▼0.2426.44 ▼24.19
Add New Post /wp-admin/post-new.php3.12 ▼2.7725.96 ▼81.20
Media Library /wp-admin/upload.php3.12 ▼0.1125.61 ▼9.66
Link Account /wp-admin/admin.php?page=allkeyshop-link-account3.1225.48

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 73 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Allkeyshop Affiliate
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲13713.37 ▼1.231.93 ▲0.0840.49 ▼7.96
Dashboard /wp-admin2,236 ▲484.89 ▼1.01111.98 ▲4.0742.52 ▼1.59
Posts /wp-admin/edit.php2,119 ▲302.03 ▲0.0140.58 ▼1.5134.46 ▼1.90
Add New Post /wp-admin/post-new.php1,550 ▲1718.45 ▼4.88602.16 ▼26.5833.81 ▼34.78
Media Library /wp-admin/upload.php1,412 ▲244.18 ▼0.0195.56 ▼10.8141.14 ▼3.15
Link Account /wp-admin/admin.php?page=allkeyshop-link-account8392.0623.9922.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 0% 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
    • > GET request to /wp-admin/admin.php?page=allkeyshop-link-account
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/allkeyshop-affiliate/public/assets/views/include/header.php
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/allkeyshop-affiliate/public/assets/views/widgetMetaBox.php:3
    • > PHP Notice
      Undefined variable: success in wp-content/plugins/allkeyshop-affiliate/public/assets/views/apiKey.php on line 4
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/allkeyshop-affiliate/public/assets/views/createGamePage.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_js() in wp-content/plugins/allkeyshop-affiliate/public/assets/views/index.php:2
    • > PHP Notice
      Undefined variable: success in wp-content/plugins/allkeyshop-affiliate/public/assets/views/apiKey.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/allkeyshop-affiliate/public/assets/views/apiKey.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/allkeyshop-affiliate/public/assets/views/gamePageContent.php:2
    • > PHP Notice
      Undefined variable: affiliateUrl in wp-content/plugins/allkeyshop-affiliate/public/assets/views/apiKey.php on line 27
    • > PHP Notice
      Undefined variable: success in wp-content/plugins/allkeyshop-affiliate/public/assets/views/apiKey.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function AllkeyshopAffiliate\\plugin_dir_path() in wp-content/plugins/allkeyshop-affiliate/main.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=allkeyshop-link-account
    • > Javascript (severe) in unknown
    /wp-content/plugins/allkeyshop-affiliate/public/assets/js/apiKey.js 67:31 Uncaught TypeError: Cannot read properties of null (reading 'dataset')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: widget, price, allkeyshop, game, comparison

allkeyshop-affiliate/main.php 85% from 13 tests

Analyzing the main PHP file in "Allkeyshop Affiliate" version 1.0.7
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 ("allkeyshop-affiliate.php" instead of "main.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin42,515 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1632827527,431
JSON50011,803
TypeScript254691,9991,948
PHP1383147748
CSS6390428
PO File13638123
Markdown213034

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity17.40
▷ Minimum class complexity2.00
▷ Maximum class complexity35.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods40
▷ Static methods40100.00%
▷ Public methods2767.50%
▷ Protected methods1332.50%
▷ Private methods00.00%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
Constants10
▷ Global constants330.00%
▷ Class constants770.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin