84% linkgenius

Code Review | Affiliate Link Manager and Link Shortener Plugin - LinkGenius

WordPress plugin Affiliate Link Manager and Link Shortener Plugin - LinkGenius scored84%from 54 tests.

About plugin

  • Plugin page: linkgenius
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Sep 15, 2023
  • Latest release: Nov 9, 2023
  • Number of updates: 8
  • Update frequency: every 7.1 days
  • Top authors: allaffiliates (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /277 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.44MB] [CPU: ▲7.32ms] Passed 4 tests

This is a short check of server-side resources used by Affiliate Link Manager and Link Shortener Plugin - LinkGenius
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.37 ▲0.9144.00 ▲4.71
Dashboard /wp-admin4.95 ▲1.6555.85 ▲6.81
Posts /wp-admin/edit.php4.96 ▲1.6059.21 ▲10.40
Add New Post /wp-admin/post-new.php7.79 ▲1.9095.99 ▲7.36
Media Library /wp-admin/upload.php4.82 ▲1.5943.47 ▲11.16
Import /wp-admin/edit.php?post_type=linkgenius_link&page=linkgenius_import5.1045.37
All Links /wp-admin/edit.php?post_type=linkgenius_link4.8949.75
Categories /wp-admin/edit-tags.php?taxonomy=linkgenius_category&post_type=linkgenius_link4.7939.57
Add New /wp-admin/post-new.php?post_type=linkgenius_link5.5461.55
Settings /wp-admin/edit.php?post_type=linkgenius_link&page=linkgenius_options_general5.1442.62
Tags /wp-admin/edit-tags.php?taxonomy=linkgenius_tag&post_type=linkgenius_link4.7942.42

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Affiliate Link Manager and Link Shortener Plugin - LinkGenius
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲10814.35 ▼0.211.75 ▲0.0241.96 ▼4.14
Dashboard /wp-admin2,275 ▲985.71 ▲0.1887.37 ▼15.4939.98 ▼2.56
Posts /wp-admin/edit.php2,181 ▲782.09 ▲0.0842.26 ▲6.8035.20 ▼0.15
Add New Post /wp-admin/post-new.php6,414 ▲4,88828.16 ▲4.62879.99 ▲260.0636.73 ▼10.56
Media Library /wp-admin/upload.php1,477 ▲744.38 ▲0.26101.50 ▼4.8441.77 ▼1.36
Import /wp-admin/edit.php?post_type=linkgenius_link&page=linkgenius_import9512.1631.0032.62
All Links /wp-admin/edit.php?post_type=linkgenius_link1,1682.0037.6731.62
Categories /wp-admin/edit-tags.php?taxonomy=linkgenius_category&post_type=linkgenius_link1,3642.2430.0726.71
Add New /wp-admin/post-new.php?post_type=linkgenius_link2,8744.1489.7937.45
Settings /wp-admin/edit.php?post_type=linkgenius_link&page=linkgenius_options_general1,0411.8231.8927.86
Tags /wp-admin/edit-tags.php?taxonomy=linkgenius_tag&post_type=linkgenius_link1,3332.2432.9534.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 44× 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 LinkGenius\\__() in wp-content/plugins/linkgenius/includes/Settings.php:203
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/linkgenius/vendor/cmb2/cmb2/includes/types/CMB2_Type_Radio.php:13
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/linkgenius/vendor/jcchavezs/cmb2-conditionals/example-functions.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/linkgenius/vendor/jcchavezs/cmb2-conditionals/example-functions.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/linkgenius/vendor/cmb2/cmb2/includes/types/CMB2_Type_File.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/linkgenius/vendor/cmb2/cmb2/includes/types/CMB2_Type_File_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/linkgenius/vendor/cmb2/cmb2/includes/types/CMB2_Type_Title.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text_Date' not found in wp-content/plugins/linkgenius/vendor/cmb2/cmb2/includes/types/CMB2_Type_Text_Time.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller' not found in wp-content/plugins/linkgenius/vendor/cmb2/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/linkgenius/vendor/cmb2/cmb2/includes/CMB2_Field.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 50 tag instead of maximum 10
The official readme.txt might help

linkgenius/linkgenius.php 92% from 13 tests

Analyzing the main PHP file in "Affiliate Link Manager and Link Shortener Plugin - LinkGenius" version 1.1.3
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 189 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected58,102 lines of code in 255 files:
LanguageFilesBlank linesComment linesLines of code
PO File12114,46118,69832,631
PHP812,5657,08010,125
JSON4006,748
CSS152651,1924,649
JavaScript104126411,666
Sass17306291,411
Markdown52740831
YAML195133
XML1428

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity19.86
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes83
▷ Abstract classes910.84%
▷ Concrete classes7489.16%
▷ Final classes00.00%
Methods656
▷ Static methods11417.38%
▷ Public methods55284.15%
▷ Protected methods9214.02%
▷ Private methods121.83%
Functions51
▷ Named functions4078.43%
▷ Anonymous functions1121.57%
Constants20
▷ Global constants1260.00%
▷ Class constants840.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
vendor/cmb2/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
vendor/cmb2/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
vendor/cmb2/cmb2/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
vendor/cmb2/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%