68% steeplyref-affiliate-referral

Code Review | SteeplyRef - Affiliate & Referral

WordPress plugin SteeplyRef - Affiliate & Referral scored68%from 54 tests.

About plugin

  • Plugin page: steeplyref-affili...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.2.2
  • WordPress version: 6.3.1
  • First release: Jun 28, 2019
  • Latest release: Jun 28, 2019
  • Number of updates: 16
  • Update frequency: N/A
  • Top authors: arthurpatriot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /604 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.10MB] [CPU: ▼3.17ms] Passed 4 tests

Analyzing server-side resources used by SteeplyRef - Affiliate & Referral
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1036.99 ▼2.59
Dashboard /wp-admin3.40 ▲0.1047.03 ▼4.49
Posts /wp-admin/edit.php3.51 ▲0.1654.22 ▲6.50
Add New Post /wp-admin/post-new.php6.00 ▲0.1292.87 ▼8.02
Media Library /wp-admin/upload.php3.32 ▲0.1035.32 ▲2.41
General Settings /wp-admin/admin.php?page=steeply-ref-general-settings3.3135.49
Analytics /wp-admin/admin.php?page=steeply-ref-analytics3.3039.30
FAQ /wp-admin/admin.php?page=steeply-ref-faq3.2931.33

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 39 new files
Database: 1 new table, 6 new options
New tables
wp_st_referrals
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

SteeplyRef - Affiliate & Referral: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,994 ▲25913.74 ▼0.565.04 ▲3.1037.96 ▼8.71
Dashboard /wp-admin2,292 ▲1044.89 ▼0.01107.92 ▼9.4145.08 ▲0.94
Posts /wp-admin/edit.php2,120 ▲312.01 ▲0.0040.43 ▲3.2336.53 ▲0.88
Add New Post /wp-admin/post-new.php1,549 ▲3518.26 ▲0.83593.84 ▼94.8763.97 ▲11.67
Media Library /wp-admin/upload.php1,422 ▲374.23 ▲0.0196.32 ▼3.8141.77 ▼1.93
General Settings /wp-admin/admin.php?page=steeply-ref-general-settings9422.0324.5029.66
Analytics /wp-admin/admin.php?page=steeply-ref-analytics9092.0235.4842.95
FAQ /wp-admin/admin.php?page=steeply-ref-faq9332.0222.1228.65

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
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_st_referrals
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/steeplyref-affiliate-referral/admin/partials/part-flex-sidebar.php
    • > /wp-content/plugins/steeplyref-affiliate-referral/admin/partials/dashboard-widget.php
    • > /wp-content/plugins/steeplyref-affiliate-referral/public/partials/steeply-ref-public-display.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/steeplyref-affiliate-referral/admin/partials/page-analytics.php:18
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/steeplyref-affiliate-referral/admin/partials/page-general-settings.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/steeplyref-affiliate-referral/admin/partials/page-faq.php:14
    • > PHP Warning
      Use of undefined constant ST_REFERRALS - assumed 'ST_REFERRALS' (this will throw an Error in a future version of PHP) in wp-content/plugins/steeplyref-affiliate-referral/admin/partials/page-analytics.php on line 16
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/steeplyref-affiliate-referral/admin/partials/page-analytics.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/steeplyref-affiliate-referral/public/partials/page-dashboard.php:3
    • > PHP Warning
      Use of undefined constant ST_REFERRALS - assumed 'ST_REFERRALS' (this will throw an Error in a future version of PHP) in wp-content/plugins/steeplyref-affiliate-referral/admin/partials/page-general-settings.php on line 19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 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
4 plugin tags: steeplyref, referral, allsteeply, affiliate

steeplyref-affiliate-referral/steeply-ref.php 92% from 13 tests

"SteeplyRef - Affiliate & Referral" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("steeplyref-affiliate-referral.php" instead of "steeply-ref.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,118 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP18319593754
CSS36911334
PO File13324
JavaScript24546

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.43
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods44
▷ Static methods715.91%
▷ Public methods3886.36%
▷ Protected methods00.00%
▷ Private methods613.64%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.33MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png42.67KB15.80KB▼ 62.96%
assets/screenshot-3.png60.24KB24.15KB▼ 59.90%
assets/icon-256x256.png30.28KB11.87KB▼ 60.81%
assets/screenshot-4.png62.88KB22.96KB▼ 63.48%
assets/screenshot-1.png59.95KB23.19KB▼ 61.32%