78% recommend-referral-integration

Code Review | Recommend Marketing, Integration Plugin

WordPress plugin Recommend Marketing, Integration Plugin scored78%from 54 tests.

About plugin

  • Plugin page: recommend-referra...
  • Plugin version: 1.3.11
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 14, 2022
  • Latest release: May 29, 2023
  • Number of updates: 21
  • Update frequency: every 12.2 days
  • Top authors: denisrcmnd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,262 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼1.36ms] Passed 4 tests

A check of server-side resources used by Recommend Marketing, Integration Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2146.93 ▲3.39
Dashboard /wp-admin3.52 ▲0.2153.42 ▼3.48
Posts /wp-admin/edit.php3.63 ▲0.2757.90 ▲9.08
Add New Post /wp-admin/post-new.php6.12 ▲0.2398.62 ▼9.87
Media Library /wp-admin/upload.php3.44 ▲0.2141.28 ▲4.53
Recommend /wp-admin/options-general.php?page=rcmnd-referal3.4136.17

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Recommend Marketing, Integration Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11713.52 ▼0.838.26 ▲6.6344.54 ▲5.20
Dashboard /wp-admin2,203 ▲265.57 ▼0.0988.15 ▼4.0741.71 ▼10.05
Posts /wp-admin/edit.php2,108 ▲82.01 ▲0.0537.81 ▲3.5734.98 ▼2.96
Add New Post /wp-admin/post-new.php1,533 ▲523.81 ▲0.76654.43 ▲54.4752.17 ▲1.00
Media Library /wp-admin/upload.php1,411 ▲204.16 ▼0.0697.10 ▲0.0945.48 ▲2.75
Recommend /wp-admin/options-general.php?page=rcmnd-referal8842.1727.2228.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/recommend-referral-integration/public/partials/rcmnd-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/recommend-referral-integration/admin/partials/rcmnd-admin-display.php:19

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 90% 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
5 plugin tags: integration, webshop, recommend, referral, marketing

recommend-referral-integration/rcmnd.php 77% from 13 tests

The primary PHP file in "Recommend Marketing, Integration Plugin" version 1.3.11 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Git Repository: Please remove the Git repository from this plugin
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("recommend-referral-integration.php" instead of "rcmnd.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,122 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP123596961,054
CSS2112029
YAML10020
SVG30013
JavaScript24546

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity16.86
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods63
▷ Static methods23.17%
▷ Public methods4571.43%
▷ Protected methods00.00%
▷ Private methods1828.57%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
14 PNG files occupy 0.45MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/rcmnd-logo-fav_old.png0.70KB0.70KB0.14%
images/rcmnd-logo-full.png4.40KB2.64KB▼ 40.09%
.wordpress-org/screenshot-3.png46.24KB13.81KB▼ 70.14%
images/rcmnd-logo-full_old.png6.42KB3.02KB▼ 53.00%
.wordpress-org/screenshot-6.png44.37KB11.73KB▼ 73.57%